#include <bits/stdc++.h>
using namespace std;
void print(int h, string &s) {
  for (int i = 0; i < h; i++) cout << "  ";
  cout << s << endl;
}
int main() {
  string s;
  vector<string> Strings;
  cin >> s;
  int curpos = s.find('<');
  int lastPos;
  while (curpos != -1) {
    lastPos = s.find('>', curpos);
    Strings.push_back(s.substr(curpos, lastPos - curpos + 1));
    curpos = s.find('<', lastPos);
    if (curpos != -1) {
      if ((curpos - lastPos) > 1) {
        Strings.push_back(s.substr(lastPos + 1, curpos - lastPos));
      }
    }
  }
  stack<char> Stack;
  int h = -1;
  for (int i = 0; i < Strings.size(); i++) {
    if (Strings[i][0] == '<') {
      if (isalpha(Strings[i][1])) {
        h++;
        print(h, Strings[i]);
      } else {
        print(h, Strings[i]);
        h--;
      }
    } else {
      print(h, Strings[i]);
    }
  }
  return 0;
}
