#include <bits/stdc++.h>
using namespace std;
template <typename T>
T gcd(T a, T b) {
  while (b > 0) {
    a %= b;
    swap(a, b);
  }
  return a;
}
template <class _T>
inline _T sqr(const _T& first) {
  return first * first;
}
template <class _T>
inline string tostr(const _T& a) {
  ostringstream os("");
  os << a;
  return os.str();
}
const long double PI = 3.1415926535897932384626433832795L;
const double EPS = 1e-9;
char TEMPORARY_CHAR;
const int INF = 1e9;
inline void input(int& a) {
  a = 0;
  while (((TEMPORARY_CHAR = getchar()) > '9' || TEMPORARY_CHAR < '0') &&
         (TEMPORARY_CHAR != '-')) {
  }
  char neg = 0;
  if (TEMPORARY_CHAR == '-') {
    neg = 1;
    TEMPORARY_CHAR = getchar();
  }
  while (TEMPORARY_CHAR <= '9' && TEMPORARY_CHAR >= '0') {
    a = 10 * a + TEMPORARY_CHAR - '0';
    TEMPORARY_CHAR = getchar();
  }
  if (neg) a = -a;
}
inline void out(long long a) {
  if (!a) putchar('0');
  if (a < 0) {
    putchar('-');
    a = -a;
  }
  char s[20];
  int i;
  for (i = 0; a; ++i) {
    s[i] = '0' + a % 10;
    a /= 10;
  }
  for (int j = (i)-1; j >= 0; j--) putchar(s[j]);
}
inline int nxt() {
  int(ret);
  input((ret));
  ;
  return ret;
}
int main() {
  srand(234134211);
  string s[6];
  s[0] = "+------------------------+";
  s[1] = "|#.#.#.#.#.#.#.#.#.#.#.|D|)";
  s[2] = "|#.#.#.#.#.#.#.#.#.#.#.|.|";
  s[3] = "|#.......................|";
  s[4] = "|#.#.#.#.#.#.#.#.#.#.#.|.|)";
  s[5] = "+------------------------+";
  int(k);
  input((k));
  ;
  while (k--) {
    for (int j = 0;; ++j) {
      for (int i = 0; i < 6; ++i) {
        if (s[i][j] == '#') {
          s[i][j] = 'O';
          goto l1;
        }
      }
    }
  l1:;
  }
  for (int i = 0; i < 6; ++i) {
    cout << s[i] << endl;
  }
  return 0;
}
