#include <bits/stdc++.h>
using namespace std;
int n, m;
char cha, st[1009];
int h = 0, op = 1, sz = 0;
int ok(char c) {
  if (('a' <= c && c <= 'z') || c == '<' || c == '>' || c == '/') return 1;
  return 0;
}
int main() {
  int i = 0;
  while (scanf("%c", &cha), ok(cha)) {
    st[sz++] = cha;
    char c1, c2, c3;
    scanf("%c%c", &c1, &c2);
    if (c1 == '/') {
      for (int i = 0; i < h - 1; i++) printf("  ");
      printf("%c%c%c>\n", cha, c1, c2);
      h--;
      scanf("%c", &cha);
    } else {
      for (int i = 0; i < h; i++) printf("  ");
      printf("%c%c>\n", cha, c1);
      h++;
    }
  }
  return 0;
}
