#include using namespace std; #pragma GCC target("avx2") #pragma GCC optimize("O3") int main() { ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); int n; cin >> n; for (int i = 1; i <= n; ++i) { for (int j = 1; j <= n; ++j) { char c; cin >> c; if (c == '?') { if ((i^j)&1) cout << 'S'; else cout << 'F'; } else cout << c; } cout << '\n'; } return 0; }