#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  string second;
  cin >> second;
  long long i = 0;
  long long need = 0;
  while (i < (long long)second.size()) {
    if (second[i] == '>') {
      if (i - 2 >= 0 && second[i - 2] == '/') {
        need -= 2;
      }
      string ans;
      long long j = i;
      while (second[j] != '<') {
        ans += second[j];
        j--;
      }
      ans += second[j];
      for (long long i = 0; i < need; i++) {
        ans += ' ';
      }
      reverse(ans.begin(), ans.end());
      cout << ans << "\n";
      if (i - 2 >= 0 && second[i - 2] == '<') {
        need += 2;
      }
    }
    i++;
  }
  return 0;
}
