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