#include <bits/stdc++.h>
using namespace std;
void solve() {
  string s;
  cin >> s;
  long long cnt = 0;
  string tag = "";
  stack<string> st;
  string ans = "";
  for (long long i = 0; i < s.size(); i++) {
    tag += s[i];
    if (s[i] == '>') {
      if (tag[1] == '/') {
        st.pop();
        long long l = 2 * (cnt - 1);
        for (long long k = 1; k <= l; k++) ans += ' ';
        ans += tag;
        ans += "\n";
        cnt -= 1;
      } else {
        cnt += 1;
        long long l = 2 * (cnt - 1);
        for (long long k = 1; k <= l; k++) ans += ' ';
        ans += tag;
        ans += "\n";
        st.push(tag);
      }
      tag = "";
    }
  }
  cout << ans << endl;
}
int main() { solve(); }
