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