#include <bits/stdc++.h>
using namespace std;
string s;
vector<string> split(string s) {
  vector<string> ret;
  s += '<';
  int cur = 0;
  for (int i = 1; i < s.length(); i++)
    if (s[i] == '<') {
      ret.push_back(s.substr(cur, i - cur));
      cur = i;
    }
  return ret;
}
bool doi(string s1, string s2) {
  if (s1.length() == s2.length()) return false;
  return true;
}
int main() {
  cin >> s;
  vector<string> ans = split(s);
  stack<string> st;
  int sl = 0;
  for (int i = 0; i < ans.size(); i++)
    if (st.size() == 0) {
      st.push(ans[i]);
      cout << ans[i] << endl;
      sl = 0;
    } else {
      if (doi(st.top(), ans[i])) {
        st.pop();
        for (int j = 0; j < sl; j++) cout << "  ";
        cout << ans[i] << endl;
        sl--;
      } else {
        st.push(ans[i]);
        sl++;
        for (int j = 0; j < sl; j++) cout << "  ";
        cout << ans[i] << endl;
      }
    }
  return 0;
}
