#include <stdlib.h> #include <stdio.h> #include <math.h> int main() { int i, t, age, temp; scanf("%d", &t); while(t--) { scanf("%d", &age); if(age - 7 >= 8) printf("%d\n", age - 7); else printf("-1\n"); } }