#include <bits/stdc++.h>
using namespace std;
int l, h, cur_level = 0;
string s, x;
int main() {
  cin >> s;
  l = s.size();
  for (int i = 0; i < l; i++) {
    x = s[i], x += s[i + 1], x += s[i + 2];
    if (s[i + 2] != '>') x += s[i + 3], i++;
    i += 2;
    for (int j = 0; j < cur_level - (x.size() == 4); j++) cout << "  ";
    cout << x << "\n";
    if (x.size() == 4)
      h = x[2] - 'a', cur_level--;
    else
      h = x[1] - 'a', cur_level++;
  }
  return 0;
}
