#include using namespace std; #define ll long long #define rep(i,n) for(ll i=0; i<(ll)(n); i++) #define repi(i,a,b) for(ll i=(ll)(a); i<(ll)(b); i++) #define all(v) (v).begin(),(v).end() using vi=vector; using vvi=vector; using vll=vector; using vvll=vector; const ll inf=2e18; template bool chmin(T& a,const S&b){ return a>b? a=b,1:0; } template bool chmax(T& a,const S&b){ return a> s; int N=1<<10; //N=20; s='@'+s; vvi ans(N+1,vi(N+1,-1)); ans[1][1]=0; for(int i=2; i<=N; i++){ ans[i][i-1]=0; ans[i][i]=0; repi(j,1,i-1)ans[i][j]=1; } repi(i,1,N+1){ if(i>=s.size() || s[i]=='o'){ repi(j,i+1,N)ans[i][j]=0; } else { repi(j,i+1,N)ans[i][j]=1; } ans[i][N]=0; } cout << N << endl; string out=".#"; repi(i,1,N+1){ repi(j,1,N+1){ cout << out[ans[i][j]]; } cout << endl; } } int main(){ cin.tie(0); ios::sync_with_stdio(false); int t=1; //cin >> t; rep(test,t)solve(test); }