#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int h = 0;
  int start = 0;
  map<int, int> m;
  set<int> hash;
  for (int i = 0; i < s.size(); ++i) {
    int index = i;
    if (s[i] == '>') {
      for (int i = 0; i < 2 * h; ++i) {
        cout << " ";
      }
      cout << s.substr(start, index - start + 1) << endl;
      hash.insert(index - 1);
      if (s[index - 2] != '/') {
        ++h;
      }
      start = index + 1;
    } else if (s[i] == '/') {
      --h;
    }
  }
  return 0;
}
