#include using namespace std; int main(){ int T; cin>>T; while(T--){ long long x; cin>>x; if(x==1){ cout<<1<<'\n'; continue;} x-=1; long long t = x/6; if(x%6==1)cout<