<?php
// your code goes here
$i = 1; $k = 0;
$new_phone = '';
for ($i = 0; $i <= strlen($phone)-1; $i++){ if (($k > 2) && ($k % 3) == 0) {$new_phone .= '-'; $k = 0;}
}
?>
PD9waHAKCi8vIHlvdXIgY29kZSBnb2VzIGhlcmUKCiRwaG9uZSA9IGZnZXRzKFNURElOKTsKJGkgPSAxOyAkayA9IDA7CiRuZXdfcGhvbmUgPSAnJzsKZm9yICgkaSA9IDA7ICRpIDw9IHN0cmxlbigkcGhvbmUpLTE7ICRpKyspewppZiAoaXNfbnVtZXJpYyhzdWJzdHIoJHBob25lLCAkaSwgMSkpKSB7JG5ld19waG9uZSAuPSBzdWJzdHIoJHBob25lLCAkaSwgMSk7ICRrKys7fQppZiAoKCRrID4gMikgJiYgKCRrICUgMykgPT0gMCkgeyRuZXdfcGhvbmUgLj0gJy0nOyAkayA9IDA7fQp9CmZ3cml0ZShTVERPVVQsICRuZXdfcGhvbmUpOwoKPz4=