#include <bits/stdc++.h>
using namespace std;
stack<int> st;
int main() {
  char tch;
  while (cin >> tch) {
    if (tch == '<') {
      cin >> tch;
      if (tch != '/') {
        st.push(st.size());
        for (int i = 0; i < 2 * st.top(); ++i) cout << ' ';
        cout << "<" << tch << '>' << endl;
        cin >> tch;
      } else {
        cin >> tch;
        for (int i = 0; i < 2 * st.top(); ++i) cout << ' ';
        cout << "</" << tch << '>' << endl;
        st.pop();
        cin >> tch;
      }
    }
  }
  return 0;
}
