#include <bits/stdc++.h>
using namespace std;
string s1, s2;
string str;
int main(void) {
  cin >> s1;
  for (int i = 0; i < (s1.size()); ++i) {
    s2.push_back(s1[i]);
    if (s1[i] == '>') s2.push_back(' ');
  }
  istringstream in(s2);
  int sp = 0;
  while (in >> str) {
    if (str[1] != '/') {
      for (int i = 0; i < (sp); ++i) cout << ' ';
      cout << str << endl;
      sp += 2;
    } else {
      sp -= 2;
      for (int i = 0; i < (sp); ++i) cout << ' ';
      cout << str << endl;
    }
  }
}
