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