#include <bits/stdc++.h>
using namespace std;
char s[2000];
int main() {
  scanf("%s", s);
  int n = strlen(s);
  int cur = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] >= 'a' && s[i] <= 'z') {
      if (s[i - 1] == '/') {
        cur--;
        for (int j = 0; j < 2 * cur; j++) {
          printf(" ");
        }
        printf("</%c>\n", s[i]);
        continue;
      }
      for (int j = 0; j < 2 * cur; j++) {
        printf(" ");
      }
      printf("<%c>\n", s[i]);
      cur++;
    }
  }
  return 0;
}
