#include <bits/stdc++.h>
using namespace std;
char ch[1010];
char a[1010][1010];
int flag[1010];
int n, m;
void deal() {
  int len = strlen(ch);
  for (int i = 0; i < len; i++) {
    int nn = 0;
    m++;
    int f = 0;
    while (ch[i] != '>') {
      if (ch[i] == '/') f = 1;
      a[m][nn++] = ch[i];
      i++;
    }
    flag[m] = f;
    a[m][nn++] = ch[i];
  }
}
int main() {
  scanf("%s", ch);
  deal();
  int now = 0;
  for (int i = 1; i <= m; i++) {
    for (int j = 1; j <= now; j++) printf("  ");
    printf("%s\n", a[i]);
    if (flag[i + 1] && flag[i])
      now--;
    else if (!flag[i + 1] && !flag[i])
      now++;
  }
  return 0;
}
