#include <bits/stdc++.h>
using namespace std;
int main() {
int t;
cin >> t;
while(t--){
int n;
cin >> n;
vector<int>v;
string s;
cin >> s;
for(int i=0; i<s.length(); i++){
v.push_back(s[i] - '0');
}
for(int u:v)cout << u << " ";
cout << endl;
}
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgppbnQgbWFpbigpIHsKCWludCB0OwoJY2luID4+IHQ7Cgl3aGlsZSh0LS0pewoJCWludCBuOwoJCWNpbiA+PiBuOwoJCXZlY3RvcjxpbnQ+djsKCQlzdHJpbmcgczsKCQljaW4gPj4gczsKCQlmb3IoaW50IGk9MDsgaTxzLmxlbmd0aCgpOyBpKyspewoJCQl2LnB1c2hfYmFjayhzW2ldIC0gJzAnKTsKCQl9CgkJZm9yKGludCB1OnYpY291dCA8PCB1IDw8ICIgIjsKCQljb3V0IDw8IGVuZGw7Cgl9CglyZXR1cm4gMDsKfQ==