#include <bits/stdc++.h>
using namespace std;
#define rep(i,a,b) for(int i=a;i<b;i++)
#define rrep(i,b,a) for(int i=b;i>=a;i--)
#define fori(i,a) for(auto i : a )
#define all(a) begin(a), end(a)
#define mset(a,b) memset(a,b,sizeof(a))
#define mcopy(a,b) memcopy(a,b,sizeof(a))
#define ll long long
ll func(ll v){
ll r = 0;
while (v >>= 1) {
r++;
}
return r;
}
void solve(){
ll x,y;
cin>>x>>y;
int flag1=0,flag2=0;
if(x<0) flag1=1;
if(y<0) flag2=1;
x=abs(x);
y=abs(y);
string ans="";
for(int i=0;i<64;i++){
ll z=func(x),l=func(y);
if(z<i && l<i) break;
// if(x==0 && y==0) break;
if(x<(1<<i) && (y<(1<<i))){
cout<<"IMPOSSIBLE"<<endl;
return ;
}
if((x&(1<<i)== (y&(1<<i)))){
cout<<"IMPOSSIBLE"<<endl;
return ;
}
else if( (x&(1<<i))==0 && (y&(1<<i))==(1<<i) ){
if( (x &(1<<(i+1)))== (y & (1<<(i+1))) && z>i){
y+=(1<<i);
ans+="S";
}
else if(z>i){
ans+="N";
y-=(1<<i);
}
else if(z<=i){
if((y & (1<<(i+1)))==0 && l>i){
y+=(1<<i);
ans+="S";
}
else{
ans+="N";
y-=(1<<i);
}
}
}
else if( (x&(1<<i))==(1<<i) && (y&(1<<i))==0 ){
// cout<<1<<endl;
if( (x&(1<<(i+1)))== (y&(1<<(i+1))) && l>i){
x+=(1<<i);
ans+="W";
// cout<<1<<endl;
}
else if(l>i){
x-=(1<<i);
ans+="E";
// cout<<2<<endl;
}
else if(l<=i){
if((x&(1<<(i+1)))==0 && z>i){
x+=(1<<i);
ans+="W";
// cout<<3<<endl;
}
else{
x-=(1<<i);
ans+="E";
// cout<<4<<endl;
}
}
}
// cout<<x<<" "<<y<<endl;
}
if(flag1){
rep(i,0,ans.length()) {
if(ans[i]=='S') ans[i]='N';
else if(ans[i]=='N') ans[i]='S';
}
}
if(flag2){
rep(i,0,ans.length()) {
if(ans[i]=='W') ans[i]='E';
else if(ans[i]=='E') ans[i]='W';
}
}
cout<<ans<<endl;
}
int main(){
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
// freopen("input.txt", "r", stdin);
// freopen("output.txt", "w", stdout);
int t,k=1;
cin>>t;
while(t--){
cout<<"Case #"<<k++<<": ";
solve();
}
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgojZGVmaW5lIHJlcChpLGEsYikgZm9yKGludCBpPWE7aTxiO2krKykKI2RlZmluZSBycmVwKGksYixhKSBmb3IoaW50IGk9YjtpPj1hO2ktLSkKI2RlZmluZSBmb3JpKGksYSkgZm9yKGF1dG8gaSA6IGEgKQojZGVmaW5lIGFsbChhKSBiZWdpbihhKSwgZW5kKGEpCiNkZWZpbmUgbXNldChhLGIpIG1lbXNldChhLGIsc2l6ZW9mKGEpKQojZGVmaW5lIG1jb3B5KGEsYikgbWVtY29weShhLGIsc2l6ZW9mKGEpKQojZGVmaW5lIGxsIGxvbmcgbG9uZwpsbCBmdW5jKGxsIHYpewogIGxsIHIgPSAwOwogIHdoaWxlICh2ID4+PSAxKSB7CiAgICAgIHIrKzsKICB9CiAgcmV0dXJuICByOwp9CnZvaWQgc29sdmUoKXsKICBsbCB4LHk7CiAgY2luPj54Pj55OwogIGludCBmbGFnMT0wLGZsYWcyPTA7CiAgaWYoeDwwKSBmbGFnMT0xOwogIGlmKHk8MCkgZmxhZzI9MTsKICB4PWFicyh4KTsKICB5PWFicyh5KTsKICBzdHJpbmcgYW5zPSIiOwoKICBmb3IoaW50IGk9MDtpPDY0O2krKyl7CiAgICBsbCB6PWZ1bmMoeCksbD1mdW5jKHkpOwogICAgaWYoejxpICYmIGw8aSkgYnJlYWs7CiAgICAvLyBpZih4PT0wICYmIHk9PTApIGJyZWFrOwogICAgaWYoeDwoMTw8aSkgJiYgKHk8KDE8PGkpKSl7CiAgICAgIGNvdXQ8PCJJTVBPU1NJQkxFIjw8ZW5kbDsKICAgICAgcmV0dXJuIDsKICAgIH0KCiAgICBpZigoeCYoMTw8aSk9PSAoeSYoMTw8aSkpKSl7CiAgICAgIGNvdXQ8PCJJTVBPU1NJQkxFIjw8ZW5kbDsKICAgICAgcmV0dXJuIDsKICAgIH0KICAgIGVsc2UgaWYoICh4JigxPDxpKSk9PTAgJiYgKHkmKDE8PGkpKT09KDE8PGkpICl7CgogICAgICBpZiggKHggJigxPDwoaSsxKSkpPT0gKHkgJiAoMTw8KGkrMSkpKSAmJiB6PmkpewogICAgICAgIHkrPSgxPDxpKTsKICAgICAgICBhbnMrPSJTIjsKICAgICAgfQogICAgICBlbHNlIGlmKHo+aSl7CiAgICAgICAgYW5zKz0iTiI7CiAgICAgICAgeS09KDE8PGkpOwogICAgICB9CiAgICAgIGVsc2UgaWYoejw9aSl7CiAgICAgICAgaWYoKHkgJiAoMTw8KGkrMSkpKT09MCAmJiBsPmkpewogICAgICAgICAgeSs9KDE8PGkpOwogICAgICAgICAgYW5zKz0iUyI7CiAgICAgICAgfQogICAgICAgIGVsc2V7CiAgICAgICAgICBhbnMrPSJOIjsKICAgICAgICAgIHktPSgxPDxpKTsKICAgICAgICB9CiAgICAgIH0KICAgIH0KICAgIGVsc2UgaWYoICh4JigxPDxpKSk9PSgxPDxpKSAmJiAoeSYoMTw8aSkpPT0wICl7CiAgICAgIC8vIGNvdXQ8PDE8PGVuZGw7CiAgICAgIGlmKCAoeCYoMTw8KGkrMSkpKT09ICh5JigxPDwoaSsxKSkpICYmIGw+aSl7CiAgICAgICAgeCs9KDE8PGkpOwogICAgICAgIGFucys9IlciOwogICAgICAgIC8vIGNvdXQ8PDE8PGVuZGw7CiAgICAgIH0KICAgICAgZWxzZSBpZihsPmkpewogICAgICAgIHgtPSgxPDxpKTsKICAgICAgICBhbnMrPSJFIjsKICAgICAgICAvLyBjb3V0PDwyPDxlbmRsOwogICAgICB9CiAgICAgIGVsc2UgaWYobDw9aSl7CiAgICAgICAgaWYoKHgmKDE8PChpK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