#include <bits/stdc++.h>
using namespace std;
const long double pi = 3.1415926535897932384626433832795;
const long double eps = 0.00000001;
const int INF = 1E9;
const int MAXN = 5000;
int open, w[30];
char c;
int main() {
  open = 0;
  while (1) {
    scanf("%c", &c);
    if (c == '\n') break;
    scanf("%c", &c);
    if (c == '/') {
      scanf("%c", &c);
      open--;
      for (int i = 0; i < (int)(open); i++) cout << "  ";
      cout << '<' << '/' << c << '>';
    } else {
      for (int i = 0; i < (int)(open); i++) cout << "  ";
      cout << '<' << c << '>';
      open++;
    }
    cout << endl;
    scanf("%c", &c);
  }
  return 0;
}
