#include <bits/stdc++.h>
using namespace std;
int main() {
  string str;
  cin >> str;
  if (str.length() == 0) return 0;
  stack<char> s;
  int depth = 1;
  s.push(str[1]);
  cout << "<" << str[1] << ">" << endl;
  for (int i = 3; i < str.length();) {
    string s1;
    if (str[i + 1] == '/')
      s1 = str.substr(i, 4);
    else
      s1 = str.substr(i, 3);
    i += s1.length();
    if (s1[1] != '/') {
      for (int j = 0; j < 2 * depth; j++) cout << " ";
      cout << s1 << endl;
      depth++;
      s.push(s1[1]);
    } else {
      depth--;
      for (int j = 0; j < 2 * depth; j++) cout << " ";
      cout << s1 << endl;
      s.pop();
    }
  }
  return 0;
}
