#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int n = s.length();
  int i = 0;
  stack<string> st;
  while (i < n) {
    if (s[i + 1] != '/') {
      string curr = "";
      int idx = i + 1;
      while (s[idx] != '>') {
        curr.push_back(s[idx]);
        idx++;
      }
      for (int ss = 0; ss < 2 * st.size(); ss++) cout << " ";
      cout << "<" << curr << ">\n";
      st.push(curr);
      i = idx + 1;
    } else {
      string curr = "";
      int idx = i + 2;
      while (s[idx] != '>') {
        curr.push_back(s[idx]);
        idx++;
      }
      string zz = st.top();
      st.pop();
      for (int ss = 0; ss < 2 * st.size(); ss++) cout << " ";
      cout << "</" << zz << ">\n";
      i = idx + 1;
    }
  }
  return 0;
}
