#include <bits/stdc++.h>
using namespace std;
int main() {
  char xml[2000];
  gets(xml);
  int nest = 0;
  for (int i = 1; i < (int)strlen(xml); i += 3) {
    if (xml[i] != '/') {
      for (int h = 0; h < nest; h++) printf("  ");
      printf("<%c>", xml[i]);
      nest++;
    } else {
      nest--;
      i++;
      for (int h = 0; h < nest; h++) printf("  ");
      printf("</%c>", xml[i]);
    }
    printf("\n");
  }
  return 0;
}
