#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  getline(cin, s);
  int l = 0;
  for (int i = 0; i < s.length() - 1; i++) {
    if (s[i] == '>') {
      cout << endl;
      continue;
    }
    if (s[i] == '<' && s[i + 1] != '/') l++;
    string sp = "";
    for (int j = 0; j < l - 1; j++) sp += "  ";
    if (s[i] == '<' && s[i + 1] == '/') l--;
    if (s[i] == '<' && s[i + 1] == '/') {
      cout << sp << "</";
      int j;
      for (j = i; s[j] != '>'; j++) {
        if (s[j] != '<' && s[j] != '/') cout << s[j];
      }
      cout << '>';
      if (j < s.length() - 1 && s[j + 1] != '<')
        cout << endl << sp << "  " << s[j + 1];
    } else if (s[i] == '<') {
      cout << sp << "<";
      int j;
      for (j = i; s[j] != '>'; j++) {
        if (s[j] != '<' && s[j] != '/') cout << s[j];
      }
      cout << '>';
      if (j < s.length() - 1 && s[j + 1] != '<')
        cout << endl << sp << "  " << s[j + 1];
    }
  }
  cout << endl;
  return 0;
}
