#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1000;
int pos[MAXN], point[MAXN], space[MAXN];
int main() {
  string s;
  int cnt = 0;
  cin >> s;
  for (int i = 0, j = 0; i < s.length(); i++)
    if (s[i] == '<') pos[j] = i, j++, cnt++;
  for (int i = 1; i < cnt; i++) {
    if (pos[i] - pos[i - 1] == 3) point[i - 1] = 2;
    if (pos[i] - pos[i - 1] == 4) point[i - 1] = -2;
  }
  space[0] = 0;
  for (int cnt = 1; point[cnt] != 0; cnt++) {
    if (point[cnt] != point[cnt - 1])
      space[cnt] = space[cnt - 1];
    else
      space[cnt] = space[cnt - 1] + point[cnt - 1];
  }
  for (int i = 0; i < cnt; i++) {
    for (int j = 0; j < space[i]; j++) cout << ' ';
    cout << s.substr(pos[i], pos[i + 1] - pos[i]) << endl;
  }
  return 0;
}
