#include <bits/stdc++.h>
using namespace std;
char ms[1001];
int len;
int k = 0;
bool p = 0;
int main(void) {
  cin >> ms;
  len = strlen(ms);
  for (int i = 0; i < len; i++) {
    if (ms[i] == '<') {
      p = 0;
      if (ms[i + 1] == '/') {
        p = 1;
        k--;
      }
      for (int j = 0; j < 2 * k; j++) {
        cout << " ";
      }
    }
    cout << ms[i];
    if ((ms[i] == '>') && (!p)) {
      cout << "\n";
      k++;
    } else if ((ms[i] == '>') && (p)) {
      cout << "\n";
    }
  }
  return 0;
}
