#include <bits/stdc++.h>
int main() {
  char x[1001], *X;
  gets(x);
  int n = strlen(x), a = 0, i, j;
  for (X = x, i = 0; i < n; i++) {
    printf("%c", *X);
    if (*X == '>') {
      printf("\n");
      if (*(X + 2) != '/')
        for (j = 0; j < 2 * a; j++) printf(" ");
      else
        for (j = 0; j < 2 * (a - 1); j++) printf(" ");
    } else if (*X >= 'a' && *X <= 'z') {
      if (*(X - 1) == '/')
        a--;
      else
        a++;
    }
    X++;
  }
}
