#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  vector<char> v;
  for (int i = 1; i < s.size(); i++) {
    if (s[i] >= 'a' && s[i] <= 'z' && s[i - 1] != '/') {
      v.push_back(s[i]);
      int space = v.size() - 1;
      for (int j = 1; j <= 2 * space; j++) {
        cout << " ";
      }
      cout << "<" << s[i] << ">" << endl;
    } else if (s[i] >= 'a' && s[i] <= 'z' && s[i - 1] == '/') {
      int space = v.size() - 1;
      for (int j = 1; j <= 2 * space; j++) {
        cout << " ";
      }
      cout << "</" << s[i] << ">" << endl;
      v.pop_back();
    }
  }
}
