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