#!/usr/bin/perl
use 5.016;
use warnings;
sub f {
$_[0], map{ $_[ $_ - ($_[$_ - 1] gt $_[$_]) ], $_[$_] } (1 .. $#_) }
say f("Personal");
say f("Hello, world!");
IyEvdXNyL2Jpbi9wZXJsCnVzZSA1LjAxNjsKdXNlIHdhcm5pbmdzOwoKc3ViIGYgewoJcmV0dXJuIHN1YnsKCQkkX1swXSwgbWFweyAkX1sgJF8gLSAoJF9bJF8gLSAxXSBndCAkX1skX10pIF0sICRfWyRfXSB9ICgxIC4uICQjXykKCX0tPihzcGxpdCAvLywgc2hpZnQpOwp9CgpzYXkgZigiUGVyc29uYWwiKTsKc2F5IGYoIkhlbGxvLCB3b3JsZCEiKTsK