#include <bits/stdc++.h>

using namespace std;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  const int N = 2026;
  vector<vector<int64_t>> dp(N, vector<int64_t>(N));
  for (int i = 1; i < N; i++) {
    for (int j = 1; j < N; j++) {
      dp[i][j] = dp[i - 1][j] + dp[i][j - 1] - dp[i - 1][j - 1] + (i - 1) * (j - 1);
    }
  }
  int64_t k;
  cin >> k;
  vector<string> res(N, string(N, '.'));
  int y = 2;
  for (int x = 1; x < N; x++) res[x][1] = '#';
  int c = 1;
  while (k > 0) {
    if (k < c) {
      y += 1;
      for (int x = 1; x < N; x++) {
        res[x][y] = '#';
      }
      y += 1;
      c = 1;
    }
    int x = 1;
    while (x < N) {
      int cur = (x - 1) * c;
      if (cur > k) {
        break;
      }
      k -= cur;
      res[x][y] = '#';
      x += 1;
    }
    y += 1;
    c += 1;
    // cout << x << " " << y << '\n';
  }
  cout << 2025 << " " << 2025 << '\n';
  for (int i = 1; i <= 2025; i++) {
    for (int j = 1; j <= 2025; j++) {
      cout << res[i][j];
    }
    cout << '\n';
  }
  return 0;
}