#include <stdio.h> #include <string.h> typedef char bool; const bool kFalse = 0; const bool kTrue = 1; const int kNumDigits = 9; const int kNumGenes = 14; bool is_vulnerable(int *counts) { for (int pair_idx = 0; pair_idx < kNumDigits; pair_idx++) { if (counts[pair_idx] >= 2) { int remain[kNumDigits]; memcpy(remain, counts, sizeof(remain)); remain[pair_idx] -= 2; for (int i = 0; i < kNumDigits; i++) { int count = remain[i]; if (count > 0 && count < 3) { if (i < (kNumDigits - 2) && remain[i + 1] >= count && remain[i + 2] >= count) { remain[i + 1] -= count; remain[i + 2] -= count; } else { goto outernext; } } } return kTrue; } outernext:; } return kFalse; } int main() { int num_cases; scanf("%d", &num_cases); for (int i = 0; i < num_cases; i++) { int counts[kNumDigits]; memset(counts, 0, sizeof(counts)); for (int j = 0; j < kNumGenes; j++) { int gene; scanf("%d", &gene); counts[gene - 1]++; } if (is_vulnerable(counts)) { printf("Vulnerable\n"); } else { printf("Immune\n"); } } return 0; }