#include using namespace std; typedef long long ll; signed main(){ ios::sync_with_stdio(false); cin.tie(0); cout << fixed << setprecision(20); ll n,k; cin>>n>>k; ll t = n/(k*k); ll m = t*k; t*=k*k; ll s = n-t; s = sqrt(s); if(s*s != n-t) s++; m += s; cout << m << endl; char c[m][m]; ll cnt=0; for(ll i=0;i= i/k * k && j< i/k *k+ k){ c[i][j] = '#'; cnt++; } else c[i][j] = '.'; cout << c[i][j]; } cout << endl; } }