<?php
function pc_permute
( $items , $perms = array ( ) ) { print join ( ' ' , $perms ) . "\n " ; } else {
for ( $i = count ( $items ) - 1 ; $i >= 0 ; -- $i ) { $newitems = $items ;
$newperms = $perms ;
pc_permute( $newitems , $newperms ) ;
}
}
}
pc_permute
( explode ( " " , "Бондаренко Николай Петрович" ) ) ;
PD9waHAKCmZ1bmN0aW9uIHBjX3Blcm11dGUoJGl0ZW1zLCAkcGVybXMgPSBhcnJheSggKSkgewogICAgaWYgKGVtcHR5KCRpdGVtcykpIHsgCiAgICAgICAgcHJpbnQgam9pbignICcsICRwZXJtcykgLiAiXG4iOwogICAgfSAgZWxzZSB7CiAgICAgICAgZm9yICgkaSA9IGNvdW50KCRpdGVtcykgLSAxOyAkaSA+PSAwOyAtLSRpKSB7CiAgICAgICAgICAgICAkbmV3aXRlbXMgPSAkaXRlbXM7CiAgICAgICAgICAgICAkbmV3cGVybXMgPSAkcGVybXM7CiAgICAgICAgICAgICBsaXN0KCRmb28pID0gYXJyYXlfc3BsaWNlKCRuZXdpdGVtcywgJGksIDEpOwogICAgICAgICAgICAgYXJyYXlfdW5zaGlmdCgkbmV3cGVybXMsICRmb28pOwogICAgICAgICAgICAgcGNfcGVybXV0ZSgkbmV3aXRlbXMsICRuZXdwZXJtcyk7CiAgICAgICAgIH0KICAgIH0KfQoKCnBjX3Blcm11dGUoZXhwbG9kZSgiICIsICLQkdC+0L3QtNCw0YDQtdC90LrQviDQndC40LrQvtC70LDQuSDQn9C10YLRgNC+0LLQuNGHIikpOwo=