#include <bits/stdc++.h>
using namespace std;
char s[10005];
int num[200];
int main() {
  int i, j, k;
  int h;
  while (scanf("%s", s) != -1) {
    memset(num, 0, sizeof(num));
    h = 0;
    for (i = 0; s[i];) {
      if (s[i + 1] != '/') {
        num[s[i + 1]]++;
        for (j = 0; j < 2 * h; j++) putchar(' ');
        printf("<%c>\n", s[i + 1]);
        i += 3;
        h++;
      } else {
        if (num[s[i + 2]] != 0) num[s[i + 2]]--, h--;
        for (j = 0; j < 2 * h; j++) putchar(' ');
        printf("</%c>\n", s[i + 2]);
        i += 4;
      }
    }
  }
}
