#include <bits/stdc++.h>
using namespace std;
int main() {
  int h = 0, i, flag, amount = 0;
  char buf, size[4];
  while (true) {
    i = 0;
    flag = 1;
    while (true) {
      buf = getchar();
      if (buf == '\n') return 0;
      size[i] = buf;
      i++;
      if (buf == '/') {
        h -= 2;
        flag = 0;
      }
      if (buf == '>') {
        if (!h) amount = 0;
        h++;
        if (flag && amount) cout << ' ' << ' ';
        break;
      }
    }
    amount++;
    for (int j = 0; j < i; j++) cout << size[j];
    cout << endl;
    for (int j = 0; j < 2 * (h - 1); j++) cout << ' ';
  }
  return 0;
}
