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