#include <bits/stdc++.h>
using namespace std;
int h;
char a[10000], x;
int main() {
  x = getchar();
  while (x != EOF && x != '\n' && x != '\r' && x != ' ' && x != '\0') {
    if (x != '<' && x != '>' && x != '/') {
      for (int i = 0; i < 2 * h; i++) cout << ' ';
      cout << '<' << x << '>' << endl;
      h++;
    }
    if (x == '/') {
      x = getchar();
      h--;
      for (int i = 0; i < 2 * h; i++) cout << ' ';
      cout << "</" << x << '>' << endl;
    }
    x = getchar();
  }
  return 0;
}
