#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  string s;
  cin >> s;
  int cnt = 0;
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == '<' && s[i + 1] == '/') {
      cnt--;
      for (int i = 0; i < 2 * cnt; i++) cout << " ";
      cout << "</" << s[i + 2] << ">" << endl;
      i += 3;
    } else if (s[i] == '<' && s[i + 1] >= 'a' && s[i + 1] <= 'z') {
      for (int i = 0; i < 2 * cnt; i++) cout << " ";
      cout << "<" << s[i + 1] << ">" << endl;
      cnt++;
      i += 2;
    } else
      continue;
  }
  return 0;
}
