#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 123;
int g[4 * 1005];
char ch;
long long cnt = 1, max2;
int b[123], c[123];
queue<char> q;
int main() {
  string second;
  int sum = 0, sa = 0, sb = 0, sc = 0, cnt = 0, ans = 0;
  cin >> second;
  string a = "", b = "";
  for (int i = 0; i < second.size() - 2; i++) {
    if (second[i] == '<' && second[i + 1] >= 'a' && second[i + 1] <= 'z') {
      q.push(second[i + 1]);
      for (int j = 0; j < q.size() * 2 - 2; j++) cout << ' ';
      cout << second.substr(i, 3) << endl;
    } else if (second[i] == '<' && second[i + 1] == '/' &&
               second[i + 2] >= 'a' && second[i + 2] <= 'z') {
      for (int j = 0; j < q.size() * 2 - 2; j++) cout << ' ';
      q.pop();
      cout << second.substr(i, 4) << endl;
    }
  }
  cout << b << ' ' << a;
  return 0;
}
