#include <bits/stdc++.h>
using ll = long long;
using ull = unsigned long long;
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  string s;
  cin >> s;
  int pos = 0, cnt = 0;
  vector<stack<int> > a(26);
  while (pos < s.size()) {
    if (s[pos + 1] != '/') {
      a[s[pos + 1] - 'a'].push(cnt);
      for (int i = 0; i < 2 * cnt; i++) cout << " ";
      cout << s[pos] << s[pos + 1] << s[pos + 2] << endl;
      pos += 3;
      cnt++;
    } else {
      cnt = a[s[pos + 2] - 'a'].top();
      a[s[pos + 2] - 'a'].pop();
      for (int i = 0; i < 2 * cnt; i++) cout << " ";
      cout << s[pos] << s[pos + 1] << s[pos + 2] << s[pos + 3] << endl;
      pos += 4;
    }
  }
  return 0;
}
