#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, now, k, level;
  string s, t, tt;
  while (cin >> s) {
    now = level = 0;
    for (i = 0; i < s.size(); ++i) {
      if (s[i] == '>') {
        t = s.substr(now, i - now + 1);
        now = i + 1;
        if (t[1] == '/') {
          level--;
          for (j = 0; j < level; ++j) cout << "  ";
          cout << t << endl;
        } else {
          for (j = 0; j < level; ++j) cout << "  ";
          cout << t << endl;
          level++;
        }
      }
    }
  }
  return 0;
}
