#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  if (n == 0) {
    cout << "+------------------------+" << endl;
    cout << "|#.#.#.#.#.#.#.#.#.#.#.|D|)" << endl;
    cout << "|#.#.#.#.#.#.#.#.#.#.#.|.|" << endl;
    cout << "|#.......................|" << endl;
    cout << "|#.#.#.#.#.#.#.#.#.#.#.|.|)" << endl;
    cout << "+------------------------+" << endl;
  }
  if (n == 1) {
    cout << "+------------------------+" << endl;
    cout << "|O.#.#.#.#.#.#.#.#.#.#.|D|)" << endl;
    cout << "|#.#.#.#.#.#.#.#.#.#.#.|.|" << endl;
    cout << "|#.......................|" << endl;
    cout << "|#.#.#.#.#.#.#.#.#.#.#.|.|)" << endl;
    cout << "+------------------------+" << endl;
  }
  if (n == 2) {
    cout << "+------------------------+" << endl;
    cout << "|O.#.#.#.#.#.#.#.#.#.#.|D|)" << endl;
    cout << "|O.#.#.#.#.#.#.#.#.#.#.|.|" << endl;
    cout << "|#.......................|" << endl;
    cout << "|#.#.#.#.#.#.#.#.#.#.#.|.|)" << endl;
    cout << "+------------------------+" << endl;
  }
  if (n == 3) {
    cout << "+------------------------+" << endl;
    cout << "|O.#.#.#.#.#.#.#.#.#.#.|D|)" << endl;
    cout << "|O.#.#.#.#.#.#.#.#.#.#.|.|" << endl;
    cout << "|O.......................|" << endl;
    cout << "|#.#.#.#.#.#.#.#.#.#.#.|.|)" << endl;
    cout << "+------------------------+" << endl;
  }
  if (n == 4) {
    cout << "+------------------------+" << endl;
    cout << "|O.#.#.#.#.#.#.#.#.#.#.|D|)" << endl;
    cout << "|O.#.#.#.#.#.#.#.#.#.#.|.|" << endl;
    cout << "|O.......................|" << endl;
    cout << "|O.#.#.#.#.#.#.#.#.#.#.|.|)" << endl;
    cout << "+------------------------+" << endl;
  }
  if (n == 5) {
    cout << "+------------------------+" << endl;
    cout << "|O.O.#.#.#.#.#.#.#.#.#.|D|)" << endl;
    cout << "|O.#.#.#.#.#.#.#.#.#.#.|.|" << endl;
    cout << "|O.......................|" << endl;
    cout << "|O.#.#.#.#.#.#.#.#.#.#.|.|)" << endl;
    cout << "+------------------------+" << endl;
  }
  if (n == 6) {
    cout << "+------------------------+" << endl;
    cout << "|O.O.#.#.#.#.#.#.#.#.#.|D|)" << endl;
    cout << "|O.O.#.#.#.#.#.#.#.#.#.|.|" << endl;
    cout << "|O.......................|" << endl;
    cout << "|O.#.#.#.#.#.#.#.#.#.#.|.|)" << endl;
    cout << "+------------------------+" << endl;
  }
  if (n == 7) {
    cout << "+------------------------+" << endl;
    cout << "|O.O.#.#.#.#.#.#.#.#.#.|D|)" << endl;
    cout << "|O.O.#.#.#.#.#.#.#.#.#.|.|" << endl;
    cout << "|O.......................|" << endl;
    cout << "|O.O.#.#.#.#.#.#.#.#.#.|.|)" << endl;
    cout << "+------------------------+" << endl;
  }
  if (n == 8) {
    cout << "+------------------------+" << endl;
    cout << "|O.O.O.#.#.#.#.#.#.#.#.|D|)" << endl;
    cout << "|O.O.#.#.#.#.#.#.#.#.#.|.|" << endl;
    cout << "|O.......................|" << endl;
    cout << "|O.O.#.#.#.#.#.#.#.#.#.|.|)" << endl;
    cout << "+------------------------+" << endl;
  }
  if (n == 9) {
    cout << "+------------------------+" << endl;
    cout << "|O.O.O.#.#.#.#.#.#.#.#.|D|)" << endl;
    cout << "|O.O.O.#.#.#.#.#.#.#.#.|.|" << endl;
    cout << "|O.......................|" << endl;
    cout << "|O.O.#.#.#.#.#.#.#.#.#.|.|)" << endl;
    cout << "+------------------------+" << endl;
  }
  if (n == 10) {
    cout << "+------------------------+" << endl;
    cout << "|O.O.O.#.#.#.#.#.#.#.#.|D|)" << endl;
    cout << "|O.O.O.#.#.#.#.#.#.#.#.|.|" << endl;
    cout << "|O.......................|" << endl;
    cout << "|O.O.O.#.#.#.#.#.#.#.#.|.|)" << endl;
    cout << "+------------------------+" << endl;
  }
  if (n == 11) {
    cout << "+------------------------+" << endl;
    cout << "|O.O.O.O.#.#.#.#.#.#.#.|D|)" << endl;
    cout << "|O.O.O.#.#.#.#.#.#.#.#.|.|" << endl;
    cout << "|O.......................|" << endl;
    cout << "|O.O.O.#.#.#.#.#.#.#.#.|.|)" << endl;
    cout << "+------------------------+" << endl;
  }
  if (n == 12) {
    cout << "+------------------------+" << endl;
    cout << "|O.O.O.O.#.#.#.#.#.#.#.|D|)" << endl;
    cout << "|O.O.O.O.#.#.#.#.#.#.#.|.|" << endl;
    cout << "|O.......................|" << endl;
    cout << "|O.O.O.#.#.#.#.#.#.#.#.|.|)" << endl;
    cout << "+------------------------+" << endl;
  }
  if (n == 13) {
    cout << "+------------------------+" << endl;
    cout << "|O.O.O.O.#.#.#.#.#.#.#.|D|)" << endl;
    cout << "|O.O.O.O.#.#.#.#.#.#.#.|.|" << endl;
    cout << "|O.......................|" << endl;
    cout << "|O.O.O.O.#.#.#.#.#.#.#.|.|)" << endl;
    cout << "+------------------------+" << endl;
  }
  if (n == 14) {
    cout << "+------------------------+" << endl;
    cout << "|O.O.O.O.O.#.#.#.#.#.#.|D|)" << endl;
    cout << "|O.O.O.O.#.#.#.#.#.#.#.|.|" << endl;
    cout << "|O.......................|" << endl;
    cout << "|O.O.O.O.#.#.#.#.#.#.#.|.|)" << endl;
    cout << "+------------------------+" << endl;
  }
  if (n == 15) {
    cout << "+------------------------+" << endl;
    cout << "|O.O.O.O.O.#.#.#.#.#.#.|D|)" << endl;
    cout << "|O.O.O.O.O.#.#.#.#.#.#.|.|" << endl;
    cout << "|O.......................|" << endl;
    cout << "|O.O.O.O.#.#.#.#.#.#.#.|.|)" << endl;
    cout << "+------------------------+" << endl;
  }
  if (n == 16) {
    cout << "+------------------------+" << endl;
    cout << "|O.O.O.O.O.#.#.#.#.#.#.|D|)" << endl;
    cout << "|O.O.O.O.O.#.#.#.#.#.#.|.|" << endl;
    cout << "|O.......................|" << endl;
    cout << "|O.O.O.O.O.#.#.#.#.#.#.|.|)" << endl;
    cout << "+------------------------+" << endl;
  }
  if (n == 17) {
    cout << "+------------------------+" << endl;
    cout << "|O.O.O.O.O.O.#.#.#.#.#.|D|)" << endl;
    cout << "|O.O.O.O.O.#.#.#.#.#.#.|.|" << endl;
    cout << "|O.......................|" << endl;
    cout << "|O.O.O.O.O.#.#.#.#.#.#.|.|)" << endl;
    cout << "+------------------------+" << endl;
  }
  if (n == 18) {
    cout << "+------------------------+" << endl;
    cout << "|O.O.O.O.O.O.#.#.#.#.#.|D|)" << endl;
    cout << "|O.O.O.O.O.O.#.#.#.#.#.|.|" << endl;
    cout << "|O.......................|" << endl;
    cout << "|O.O.O.O.O.#.#.#.#.#.#.|.|)" << endl;
    cout << "+------------------------+" << endl;
  }
  if (n == 19) {
    cout << "+------------------------+" << endl;
    cout << "|O.O.O.O.O.O.#.#.#.#.#.|D|)" << endl;
    cout << "|O.O.O.O.O.O.#.#.#.#.#.|.|" << endl;
    cout << "|O.......................|" << endl;
    cout << "|O.O.O.O.O.O.#.#.#.#.#.|.|)" << endl;
    cout << "+------------------------+" << endl;
  }
  if (n == 20) {
    cout << "+------------------------+" << endl;
    cout << "|O.O.O.O.O.O.O.#.#.#.#.|D|)" << endl;
    cout << "|O.O.O.O.O.O.#.#.#.#.#.|.|" << endl;
    cout << "|O.......................|" << endl;
    cout << "|O.O.O.O.O.O.#.#.#.#.#.|.|)" << endl;
    cout << "+------------------------+" << endl;
  }
  if (n == 21) {
    cout << "+------------------------+" << endl;
    cout << "|O.O.O.O.O.O.O.#.#.#.#.|D|)" << endl;
    cout << "|O.O.O.O.O.O.O.#.#.#.#.|.|" << endl;
    cout << "|O.......................|" << endl;
    cout << "|O.O.O.O.O.O.#.#.#.#.#.|.|)" << endl;
    cout << "+------------------------+" << endl;
  }
  if (n == 22) {
    cout << "+------------------------+" << endl;
    cout << "|O.O.O.O.O.O.O.#.#.#.#.|D|)" << endl;
    cout << "|O.O.O.O.O.O.O.#.#.#.#.|.|" << endl;
    cout << "|O.......................|" << endl;
    cout << "|O.O.O.O.O.O.O.#.#.#.#.|.|)" << endl;
    cout << "+------------------------+" << endl;
  }
  if (n == 23) {
    cout << "+------------------------+" << endl;
    cout << "|O.O.O.O.O.O.O.O.#.#.#.|D|)" << endl;
    cout << "|O.O.O.O.O.O.O.#.#.#.#.|.|" << endl;
    cout << "|O.......................|" << endl;
    cout << "|O.O.O.O.O.O.O.#.#.#.#.|.|)" << endl;
    cout << "+------------------------+" << endl;
  }
  if (n == 24) {
    cout << "+------------------------+" << endl;
    cout << "|O.O.O.O.O.O.O.O.#.#.#.|D|)" << endl;
    cout << "|O.O.O.O.O.O.O.O.#.#.#.|.|" << endl;
    cout << "|O.......................|" << endl;
    cout << "|O.O.O.O.O.O.O.#.#.#.#.|.|)" << endl;
    cout << "+------------------------+" << endl;
  }
  if (n == 25) {
    cout << "+------------------------+" << endl;
    cout << "|O.O.O.O.O.O.O.O.#.#.#.|D|)" << endl;
    cout << "|O.O.O.O.O.O.O.O.#.#.#.|.|" << endl;
    cout << "|O.......................|" << endl;
    cout << "|O.O.O.O.O.O.O.O.#.#.#.|.|)" << endl;
    cout << "+------------------------+" << endl;
  }
  if (n == 26) {
    cout << "+------------------------+" << endl;
    cout << "|O.O.O.O.O.O.O.O.O.#.#.|D|)" << endl;
    cout << "|O.O.O.O.O.O.O.O.#.#.#.|.|" << endl;
    cout << "|O.......................|" << endl;
    cout << "|O.O.O.O.O.O.O.O.#.#.#.|.|)" << endl;
    cout << "+------------------------+" << endl;
  }
  if (n == 27) {
    cout << "+------------------------+" << endl;
    cout << "|O.O.O.O.O.O.O.O.O.#.#.|D|)" << endl;
    cout << "|O.O.O.O.O.O.O.O.O.#.#.|.|" << endl;
    cout << "|O.......................|" << endl;
    cout << "|O.O.O.O.O.O.O.O.#.#.#.|.|)" << endl;
    cout << "+------------------------+" << endl;
  }
  if (n == 28) {
    cout << "+------------------------+" << endl;
    cout << "|O.O.O.O.O.O.O.O.O.#.#.|D|)" << endl;
    cout << "|O.O.O.O.O.O.O.O.O.#.#.|.|" << endl;
    cout << "|O.......................|" << endl;
    cout << "|O.O.O.O.O.O.O.O.O.#.#.|.|)" << endl;
    cout << "+------------------------+" << endl;
  }
  if (n == 29) {
    cout << "+------------------------+" << endl;
    cout << "|O.O.O.O.O.O.O.O.O.O.#.|D|)" << endl;
    cout << "|O.O.O.O.O.O.O.O.O.#.#.|.|" << endl;
    cout << "|O.......................|" << endl;
    cout << "|O.O.O.O.O.O.O.O.O.#.#.|.|)" << endl;
    cout << "+------------------------+" << endl;
  }
  if (n == 30) {
    cout << "+------------------------+" << endl;
    cout << "|O.O.O.O.O.O.O.O.O.O.#.|D|)" << endl;
    cout << "|O.O.O.O.O.O.O.O.O.O.#.|.|" << endl;
    cout << "|O.......................|" << endl;
    cout << "|O.O.O.O.O.O.O.O.O.#.#.|.|)" << endl;
    cout << "+------------------------+" << endl;
  }
  if (n == 31) {
    cout << "+------------------------+" << endl;
    cout << "|O.O.O.O.O.O.O.O.O.O.#.|D|)" << endl;
    cout << "|O.O.O.O.O.O.O.O.O.O.#.|.|" << endl;
    cout << "|O.......................|" << endl;
    cout << "|O.O.O.O.O.O.O.O.O.O.#.|.|)" << endl;
    cout << "+------------------------+" << endl;
  }
  if (n == 32) {
    cout << "+------------------------+" << endl;
    cout << "|O.O.O.O.O.O.O.O.O.O.O.|D|)" << endl;
    cout << "|O.O.O.O.O.O.O.O.O.O.#.|.|" << endl;
    cout << "|O.......................|" << endl;
    cout << "|O.O.O.O.O.O.O.O.O.O.#.|.|)" << endl;
    cout << "+------------------------+" << endl;
  }
  if (n == 33) {
    cout << "+------------------------+" << endl;
    cout << "|O.O.O.O.O.O.O.O.O.O.O.|D|)" << endl;
    cout << "|O.O.O.O.O.O.O.O.O.O.O.|.|" << endl;
    cout << "|O.......................|" << endl;
    cout << "|O.O.O.O.O.O.O.O.O.O.#.|.|)" << endl;
    cout << "+------------------------+" << endl;
  }
  if (n == 34) {
    cout << "+------------------------+" << endl;
    cout << "|O.O.O.O.O.O.O.O.O.O.O.|D|)" << endl;
    cout << "|O.O.O.O.O.O.O.O.O.O.O.|.|" << endl;
    cout << "|O.......................|" << endl;
    cout << "|O.O.O.O.O.O.O.O.O.O.O.|.|)" << endl;
    cout << "+------------------------+" << endl;
  }
  return 0;
}
