#include <bits/stdc++.h>
using namespace std;
int main() {
  string s1;
  cin >> s1;
  int l = s1.length();
  int c = 0;
  cout << s1[0];
  for (int i = 1; i < l; i++) {
    if (s1[i] == '<') {
      if (s1[i + 1] != '/') {
        c = c + 2;
        for (int j = 0; j < c; j++) {
          cout << " ";
        }
      } else {
        for (int j = 0; j < c; j++) {
          cout << " ";
        }
        c = c - 2;
      }
    }
    cout << s1[i];
    if (s1[i] == '>') {
      cout << "\n";
    }
  }
}
