using System; using static System.Console; using System.Linq; using System.Collections.Generic; class Program { static int NN => int.Parse(ReadLine()); static int[] NList => ReadLine().Split().Select(int.Parse).ToArray(); static void Main() { var t = NN; var res = new int[t]; for (var u = 0; u < t; ++u) { var n = NN; res[u] = CountDown(n); } WriteLine(string.Join("\n", res)); } static int CountDown(int n) { switch(n) { case 1: case 3: case 4: case 5: case 7: case 8: return 1; default: return 2; } } }