#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, s1;
  cin >> s;
  int l = s.size();
  int level = 0;
  s1 = "";
  for (int a = 0; a < l; a++) {
    s1 += s[a];
    if (s[a] == '>') {
      if (s1[1] == '/') {
        level -= 1;
        for (int b = 0; b < (2 * level); b++) {
          cout << " ";
        }
      } else {
        for (int b = 0; b < (2 * level); b++) {
          cout << " ";
        }
        level += 1;
      }
      cout << s1 << endl;
      s1 = "";
    }
  }
  return 0;
}
