#include <bits/stdc++.h>
using namespace std;
int main() {
  char a[1001];
  cin >> a;
  char b[1000];
  char ch;
  int aa = 0, sw = 1;
  int k = 0;
  for (int i = 0; a[i] != '\0'; i++) {
    if (a[i] == '<' && a[i + 1] != '/') {
      ch = a[i + 1];
      sw = 1;
      i = i + 2;
      for (int j = 0; j < k; j++) {
        cout << "  ";
      }
      k++;
    } else {
      k--;
      ch = a[i + 2];
      sw = 0;
      i = i + 3;
      for (int j = 0; j < k; j++) {
        cout << "  ";
      }
    }
    cout << "<";
    if (sw == 0) cout << "/";
    cout << ch << ">" << endl;
  }
  return 0;
}
