Easy Solution

#include
using namespace std;

int main() {
// your code goes here
int t;
cin >> t;
while(t–)
{
int x;
cin >> x;
if(x%4==1||x==1)
cout << “East” << “\n”;
else if(x%4==2||x==2)
cout << “South” << “\n”;
else if(x%4==3||x==3)
cout << “West” << “\n”;
else if(x%4==0||x==4)
cout << “North” << “\n”;
}
return 0;
}