#include <bits/stdc++.h>
using namespace std;
int i, h, lg, j;
char s[1004];
int main() {
  cin >> s;
  h = i = 0;
  lg = strlen(s);
  while (i < lg) {
    if (s[i + 1] < 'a' || s[i + 1] > 'z') {
      --h;
      for (j = 1; j <= h; j++) {
        cout << "  ";
      }
      cout << s[i] << s[i + 1] << s[i + 2] << s[i + 3] << '\n';
      i += 4;
    } else {
      for (j = 1; j <= h; j++) {
        cout << "  ";
      }
      cout << s[i] << s[i + 1] << s[i + 2] << '\n';
      i += 3;
      h++;
    }
  }
  return 0;
}
