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