#include <bits/stdc++.h>
using namespace std;
int T, n;
inline int read() {
  int ch = getchar(), rtn = 0;
  while (!isdigit(ch)) ch = getchar();
  while (isdigit(ch)) rtn = rtn * 10 + ch - '0', ch = getchar();
  return rtn;
}
int main() {
  for (T = read(); T; --T) printf("%d\n", read() / 7 + 1);
  return 0;
}
