#include <bits/stdc++.h>
using namespace std;
int main() {
  long long k, l, n, m;
  cin >> k;
  if (k <= 4) {
    m = k % 4;
    cout << "+";
    for (int i = 0; i <= 11; ++i) {
      cout << "--";
    }
    cout << "+\n";
    cout << "|";
    if (k >= 1) {
      cout << "O.";
    } else {
      cout << "#.";
    }
    for (int i = 1; i <= 10; ++i) {
      cout << "#.";
    }
    cout << "|D|)\n";
    cout << "|";
    if (k >= 2) {
      cout << "O.";
    } else {
      cout << "#.";
    }
    for (int i = 1; i <= 10; ++i) {
      cout << "#.";
    }
    cout << "|.|\n";
    if (k >= 3) {
      cout << "|O.";
    } else {
      cout << "|#.";
    }
    for (int i = 1; i <= 10; ++i) {
      cout << "..";
    }
    cout << "..|\n";
    cout << "|";
    if (k >= 4) {
      cout << "O.";
    } else {
      cout << "#.";
    }
    for (int i = 1; i <= 10; ++i) {
      cout << "#.";
    }
    cout << "|.|)\n";
    cout << "+";
    for (int i = 0; i <= 11; ++i) {
      cout << "--";
    }
    cout << "+\n";
  } else if (k <= 34) {
    k = k - 4;
    n = k / 3;
    m = k % 3;
    cout << "+";
    for (int i = 0; i <= 11; ++i) {
      cout << "--";
    }
    cout << "+\n";
    if (m != 0) {
      n = n + 1;
    }
    cout << "|";
    for (int i = 0; i <= n; ++i) {
      cout << "O.";
    }
    for (int i = n + 1; i <= 10; ++i) {
      cout << "#.";
    }
    cout << "|D|)\n";
    if (m == 1) {
      n = n - 1;
    }
    cout << "|";
    for (int i = 0; i <= n; ++i) {
      cout << "O.";
    }
    for (int i = n + 1; i <= 10; ++i) {
      cout << "#.";
    }
    cout << "|.|\n";
    cout << "|O.";
    for (int i = 1; i <= 10; ++i) {
      cout << "..";
    }
    cout << "..|\n";
    if (m == 2) {
      n = n - 1;
    }
    cout << "|";
    for (int i = 0; i <= n; ++i) {
      cout << "O.";
    }
    for (int i = n + 1; i <= 10; ++i) {
      cout << "#.";
    }
    cout << "|.|)\n";
    cout << "+";
    for (int i = 0; i <= 11; ++i) {
      cout << "--";
    }
    cout << "+\n";
  }
  return 0;
}
