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