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