#!/usr/bin/env php
<?php
while (($line = fgets(STDIN)) !== false)
{
$subdomain = rtrim($line, "\n");
$path = implode("/", array_reverse(explode(".", $subdomain)));
print($path."\n");
}
?>