<?php

$c = trim(fgets(STDIN));
for($i = 0; $i<$c; $i++){
    $a = explode(" ", trim(fgets(STDIN)));
    $b = explode(" ", trim(fgets(STDIN)));
    $val = array();
    $n = 0;
    $count = 0;
    foreach($b as $k => $v){
        if($v % 2 == 1){
            $count += 1;
            if($count <= $a[1]){
                $val[] = $k + 1;
            }
        }
    }
    $p = $count % $a[1];
    $val[count($val) - 1] = count($b);
    if(($count < $a[1] || ($count + 1 - $a[1]) % 2 == 0)){
        echo "NO\n";
        continue;
    } else {
        echo "YES\n";
        foreach($val as $r){
            echo $r." ";
        }
        echo "\n";
    }
}

?>

<?php
list($c) = explode(' ', trim(fgets(STDIN)));
for($j = 0; $j < $c; $j++){
    list($x,$y) = explode(' ', trim(fgets(STDIN)));
    $aArray = explode(' ', trim(fgets(STDIN)));
    $iCount = $y;
    $aTest = [];
    $bFlag = false;
    foreach ($aArray as $sK => $sV){
        if($sV % 2 != 0){
            if($iCount > 1){
                $aTest[] = $sK + 1;
                $iCount--;
            } elseif($iCount == 1 && test($aArray,$sK,$x) % 2 != 0){
                $aTest[] = $x;
                $iCount--;
                $bFlag = true;
            } else {
               $iCount--;
            }
        }
    }
    if(!$bFlag){
        echo "NO\n";
    } else {
        echo "YES\n";
        echo implode(" ",$aTest). "\n";
    }
}

function test(&$aArray, $iStart, $iEnd){
    $iT = 0;
    for($i = $iStart; $i < $iEnd; $i++){
        $iT += $aArray[$i];
    }
    return $iT;
}

<?php
list($c) = explode(' ', trim(fgets(STDIN)));
for($j = 0; $j < $c; $j++){
    list($x,$y) = explode(' ', trim(fgets(STDIN)));
    $aArray = explode(' ', trim(fgets(STDIN)));
    $iCount = $y;
    $aTest = [];
    foreach ($aArray as $sK => $sV){
        if($sV % 2 != 0){
            if($iCount > 1){
                $aTest[] = $sK + 1;
                $iCount--;
            } elseif($iCount == 1){
                $aTest[] = $x;
                $iCount--;
            } else {
                $aTest[] = $x;
                $iCount--;
            }
        }
    }
    if(count($aTest) != $y){
        echo "NO\n";
    } else {
        echo "YES\n";
        echo implode(" ",$aTest). "\n";
    }

}

<?php
list($c) = explode(' ', trim(fgets(STDIN)));
for($j = 0; $j < $c; $j++){
    list($x,$y) = explode(' ', trim(fgets(STDIN)));
    $aArray = explode(' ', trim(fgets(STDIN)));
    $iCount = $y;
    $aTest = [];
    $bFlag = false;
    $aArrayB = $aArray;
    $aArrayC = $aArray;
    foreach ($aArray as $sK => $sV){
        $aArrayB = $aArray;
        if($sV % 2 != 0){
            if($iCount > 1){
                $aTest[] = $sK + 1;
                $iCount--;
            } elseif($iCount == 1 && array_sum(array_slice($aArrayB,$sK,false)) % 2 != 0){
                $aTest[] = $x;
                $iCount--;
                $bFlag = true;
            }
        }
    }
    if(!$bFlag){
        echo "NO\n";
    } else {
        echo "YES\n";
        echo implode(" ",$aTest). "\n";
    }

}

<?php
list($c) = explode(' ', trim(fgets(STDIN)));
for($j = 0; $j < $c; $j++){
    list($x,$y) = explode(' ', trim(fgets(STDIN)));
    $aArray = explode(' ', trim(fgets(STDIN)));
    $iCount = $y;
    $aTest = [];
    $bFlag = false;
    foreach ($aArray as $sK => $sV){
        if($sV % 2 != 0){
            $aArrayB = array_slice($aArray,$sK,$x,false);
            if($iCount > 1){
                $aTest[] = $sK + 1;
                $iCount--;
            } elseif($iCount == 1 && array_sum($aArrayB) % 2 != 0){
                $aTest[] = $x;
                $iCount--;
                $bFlag = true;
            }
        }
    }
    if(!$bFlag){
        echo "NO\n";
    } else {
        echo "YES\n";
        echo implode(" ",$aTest). "\n";
    }

}

<?php
list($c) = explode(' ', trim(fgets(STDIN)));
for($j = 0; $j < $c; $j++){
    list($x,$y) = explode(' ', trim(fgets(STDIN)));
    $aArray = explode(' ', trim(fgets(STDIN)));
    $iCount = $y;
    $aTest = [];
    $bFlag = false;
    $aArrayB = $aArray;
    foreach ($aArray as $sK => $sV){
        if($sV % 2 != 0){
            if($iCount > 1){
                $aTest[] = $sK + 1;
                $iCount--;
            } elseif($iCount == 1 && array_sum(array_slice($aArrayB,$sK - 1)) % 2 != 0){
                $aTest[] = $x;
                $iCount--;
                $bFlag = true;
            }
        }
    }
    if(!$bFlag){
        echo "NO\n";
    } else {
        echo "YES\n";
        echo implode(" ",$aTest). "\n";
    }

}

<?php
list($c) = explode(' ', trim(fgets(STDIN)));
for($j = 0; $j < $c; $j++){
    list($x,$y) = explode(' ', trim(fgets(STDIN)));
    $aArray = explode(' ', trim(fgets(STDIN)));
    $iCount = $y;
    $aTest = [];
    foreach ($aArray as $sK => $sV){
        if($sV % 2 != 0){
            if($iCount > 1){
                $aTest[] = $sK + 1;
                $iCount--;
            } else{
                $aTest[] = $x;
                $iCount--;
            }
        }
    }
    if(count($aTest) != $y){
        echo "NO\n";
    } else {
        echo "YES\n";
        echo implode(" ",$aTest). "\n";
    }

}

<?php

$c = trim(fgets(STDIN));
for($i = 0; $i<$c; $i++){
    $a = explode(" ", trim(fgets(STDIN)));
    $b = explode(" ", trim(fgets(STDIN)));
    $val = array();
    $count = 0;
    foreach($b as $k => $v){
        if($v % 2 == 1){
            $count += 1;
            if($count <= $a[1]){
                $val[] = $k + 1;
            }

        }
    }
    $val[count($val) - 1] = count($b);
    if($count < $a[1] || $count - 1 == $a[1]){
        echo "NO\n";
        continue;
    } else {
        echo "YES\n";
        foreach($val as $r){
            echo $r." ";
        }
        echo "\n";
    }
}

?>

<?php

$c = trim(fgets(STDIN));
for($i = 0; $i<$c; $i++){
    $a = explode(" ", trim(fgets(STDIN)));
    $b = explode(" ", trim(fgets(STDIN)));
    $val = array();
    $count = 0;
    foreach($b as $k => $v){
        if($v % 2 == 1){
            $count += 1;
            if($count <= $a[1]){
                $val[] = $k + 1;
            }

        }
    }
    $p = $count % $a[1];
    $val[count($val) - 1] = count($b);
    if($count < $a[1] || ($p % 2 == 1)){
        echo "NO\n";
        continue;
    } else {
        echo "YES\n";
        foreach($val as $r){
            echo $r." ";
        }
        echo "\n";
    }
}

?>

<?php

$c = trim(fgets(STDIN));
for($i = 0; $i<$c; $i++){
    $a = explode(" ", trim(fgets(STDIN)));
    $b = explode(" ", trim(fgets(STDIN)));
    $val = array();
    $count = 0;
    foreach($b as $k => $v){
        if($v % 2 == 1){
            $count += 1;
            if($count <= $a[1]){
                $val[] = $k + 1;
            }

        }
    }
    $val[count($val) - 1] = count($b);
    if($count < $a[1] || $count % $a[1] == 1){
        echo "NO\n";
        continue;
    } else {
        echo "YES\n";
        foreach($val as $r){
            echo $r." ";
        }
        echo "\n";
    }
}

?>

<?php

$c = trim(fgets(STDIN));
for($i = 0; $i<$c; $i++){
    $a = explode(" ", trim(fgets(STDIN)));
    $b = explode(" ", trim(fgets(STDIN)));
    $val = array();
    $n = 0;
    $count = 0;
    foreach($b as $k => $v){
        if($v % 2 == 1){
            $count += 1;
            $n += $v;
            if($count <= $a[1]){
                $val[] = $k + 1;
            }
        }
    }
    $p = $count % $a[1];
    $val[count($val) - 1] = count($b);
    if($count < $a[1] || (($p % 2 == 1) || ($n % 2 == 0 && $a[1] == 1))){
        echo "NO\n";
        continue;
    } else {
        echo "YES\n";
        foreach($val as $r){
            echo $r." ";
        }
        echo "\n";
    }
}

?>

<?php

$c = trim(fgets(STDIN));
for($i = 0; $i<$c; $i++){
    $a = explode(" ", trim(fgets(STDIN)));
    $b = explode(" ", trim(fgets(STDIN)));
    $val = array();
    $count = 0;
    foreach($b as $k => $v){
        if($v % 2 == 1){
            $count += 1;
            $val[] = $k + 1;
        }
    }
    $val[count($val) - 1] = count($b);
    if($count < $a[1]){
        echo "NO\n";
        continue;
    } else {
        echo "YES\n";
        foreach($val as $r){
            echo $r." ";
        }
        echo "\n";
    }
}

?>

<?php

$c = trim(fgets(STDIN));
for($i = 0; $i<$c; $i++){
    $a = explode(" ", trim(fgets(STDIN)));
    $b = explode(" ", trim(fgets(STDIN)));
    $val = array();
    $n = 0;
    $count = 0;
    foreach($b as $k => $v){
        if($v % 2 == 1){
            $count += 1;
            $n += $v;
            if($count <= $a[1]){
                $val[] = $k + 1;
            }
        }
    }
    $p = $count % $a[1];
    $val[count($val) - 1] = count($b);
    if($count < $a[1] || (($p % 2 == 1) || ($n % 2 == 0))){
        echo "NO\n";
        continue;
    } else {
        echo "YES\n";
        foreach($val as $r){
            echo $r." ";
        }
        echo "\n";
    }
}

?>

<?php

$c = trim(fgets(STDIN));
for($i = 0; $i<$c; $i++){
    $a = explode(" ", trim(fgets(STDIN)));
    $b = explode(" ", trim(fgets(STDIN)));
    $val = array();
    $count = 0;
    foreach($b as $k => $v){
        if($v % 2 == 1){
            $count += 1;
            if($count <= $a[1]){
                $val[] = $k + 1;
            }

        }
    }
    $p = $count % $a[1];
    echo $p;
    $val[count($val) - 1] = count($b);
    if($count < $a[1] || ($p % 2 == 1)){
        echo "NO\n";
        continue;
    } else {
        echo "YES\n";
        foreach($val as $r){
            echo $r." ";
        }
        echo "\n";
    }
}

?>

<?php

$c = trim(fgets(STDIN));
for($i = 0; $i<$c; $i++){
    $a = explode(" ", trim(fgets(STDIN)));
    $b = explode(" ", trim(fgets(STDIN)));
    $val = array();
    $count = 0;
    foreach($b as $k => $v){
        if($v % 2 == 1){
            $count += 1;
            if($count <= $a[1]){
                $val[] = $k + 1;
            }

        }
    }
    $val[count($val) - 1] = count($b);
    if($count < $a[1]){
        echo "NO\n";
        continue;
    } else {
        echo "YES\n";
        foreach($val as $r){
            echo $r." ";
        }
        echo "\n";
    }
}

?>

<?php
list($c) = explode(' ', trim(fgets(STDIN)));
for($j = 0; $j < $c; $j++){
    list($x,$y) = explode(' ', trim(fgets(STDIN)));
    $aArray = explode(' ', trim(fgets(STDIN)));
    $iCount = $y;
    $aTest = [];
    $bFlag = false;
    $aArrayB = $aArray;
    $aArrayC = $aArray;
    foreach ($aArray as $sK => $sV){
        $aArrayB = $aArray;
        if($sV % 2 != 0){
            if($iCount > 1){
                $aTest[] = $sK + 1;
                $iCount--;
            } elseif($iCount == 1 && array_sum(array_slice($aArrayB,$sK,true)) % 2 != 0){
                $aTest[] = $x;
                $iCount--;
                $bFlag = true;
            }
        }
    }
    if(!$bFlag){
        echo "NO\n";
    } else {
        echo "YES\n";
        echo implode(" ",$aTest). "\n";
    }

}

<?php
list($c) = explode(' ', trim(fgets(STDIN)));
for($j = 0; $j < $c; $j++){
    list($x,$y) = explode(' ', trim(fgets(STDIN)));
    $aArray = explode(' ', trim(fgets(STDIN)));
    $iCount = $y;
    $aTest = [];
    foreach ($aArray as $sK => $sV){
        if($sV % 2 != 0){
            if($iCount > 0){
                $aTest[] = $sK + 1;
                $iCount--;
            } else{
                $aTest[] = $x;
                $iCount--;
            }
        }
    }
    if(count($aTest) != $y){
        echo "NO\n";
    } else {
        echo "YES\n";
        echo implode(" ",$aTest). "\n";
    }

}

<?php
list($c) = explode(' ', trim(fgets(STDIN)));
for($j = 0; $j < $c; $j++){
    list($x,$y) = explode(' ', trim(fgets(STDIN)));
    $aArray = explode(' ', trim(fgets(STDIN)));
    $iCount = $y;
    $aTest = [];
    $bFlag = false;
    $aArrayB = $aArray;
    foreach ($aArray as $sK => $sV){
        if($sV % 2 != 0){
            if($iCount > 1){
                $aTest[] = $sK + 1;
                $iCount--;
            } elseif($iCount == 1 && array_sum(array_slice($aArrayB,$sK)) % 2 != 0){
                $aTest[] = $x;
                $iCount--;
                $bFlag = true;
            }
        }
    }
    if(!$bFlag){
        echo "NO\n";
    } else {
        echo "YES\n";
        echo implode(" ",$aTest). "\n";
    }

}


<?php
   $s=explode(" ",trim(fgets(STDIN)));
    $n=$s[0];
     $m=$s[1];
$counter=0;
$maxi=0;
   for($i=0;$i<$m;$i++){
         $x=trim(fgets(STDIN));
         if(strpos($x,"0")!==false){
              $counter++;
         }else{
               if($counter>$maxi)
                      $maxi=$counter;
               $counter=0;
          }
    }
     if($counter>$maxi)
                      $maxi=$counter;
    echo $maxi;
?>

<?php

$lines  = @file("php://stdin");
$info = explode(' ', array_shift($lines));
$enemies = $info[0];
$days = $info[1];
$seq = [];
foreach($lines as $line){
    if(in_array('0', str_split($line))) $seq[] = 1;
    else $seq[] = 0;
}
$len = 0;

for($i =0; $i < $days; $i++){
    if($seq[$i] == 1){
        $cur_len =0;
        $j=$i;
        do{
            $cur_len++;
            $j++;
        }
        while($seq[$j] == 1);
        if($cur_len > $len) $len = $cur_len;
        $i = $j;
    }
}

print_r( $len);


<?php

$num = (int)readline();

$k = 0;

$array = array();

for ($i = 0; $i < $num; $i++) {
    $str = explode(' ' , readline());
    if($str[0] % $str[1] == 0) {
        $k = 0;
    } else {
        $k = abs($str[0] - ((int)($str[0]/$str[1]) + 1) * $str[1]);
    }
    array_push($array , $k);
}

foreach ($array as $elem) {
    echo $elem."\n";
}

<?php
    define("MAXN", 1024) ;
    define("GAP_VAL", 1e-7) ;

    function gap($n)
    {
        return $n < GAP_VAL ;
    }

    $t = intval(trim(fgets(STDIN))) ;
    while($t --)
    {
        $in_str = explode(" ", trim(fgets(STDIN))) ;

        $a = intval($in_str[0]) ;
        $b = intval($in_str[1]) ;

        $c = intval($a / $b) ;

        if($b * $c == $a) echo "0\n" ;
        else echo $b * ($c + 1) - $a . "\n" ;
    }
?>


<?php
    define("MAXN", 1024) ;
    define("GAP_VAL", 1e-7) ;

    function gap($n)
    {
        return $n < GAP_VAL ;
    }

    $t = intval(trim(fgets(STDIN))) ;
    while($t --)
    {
        $in_str = explode(" ", trim(fgets(STDIN))) ;

        $n = intval($in_str[0]) ;
        $m = intval($in_str[1]) ;

        $cc = intval(($m + 1) / 2) ;
        $bb = $n * $m ;

        for($i = 0; $i < $n; $i ++)
        {
            if($i&1) $ss = str_repeat("WB", $cc) ;
            else $ss = str_repeat("BW", $cc) ;

            if($i == $n - 1 && $bb%2 == 0)
            {
                $ss[$m - 2] = 'B' ;
                $ss[$m - 1] = 'B' ;
            }

            echo substr($ss, 0, $m) . "\n" ;
        }
    }
?>


<?php

class InputReader {
	protected $_fh;

	public function __construct($fileHandler = STDIN)
	{
		$this->_fh = $fileHandler;
	}

	public function readFloat()
	{
		$d = trim(fgets($this->_fh));

		return (float)$d;
	}

	public function readInt()
	{
		$d = trim(fgets($this->_fh));

		return (int)$d;
	}

	public function readString()
	{
		$s = trim(fgets($this->_fh));

		return $s;
	}

	public function readArrayOfInt($size, $indexFrom = 0)
	{
		$a = [];
		$ind = $indexFrom;
		foreach (explode(' ', fgets($this->_fh)) as $item) {
			$a[$ind++] = (int)$item;
		}

		return $a;
	}

	public function readArrayOfString($size, $indexFrom = 0)
	{
		$a = [];
		$ind = $indexFrom;
		foreach (explode(' ', fgets($this->_fh)) as $item) {
			$a[$ind++] = $item;
		}

		return $a;
	}
}

function ntimes($n, $func, $returnResults = false) {
	$a = [];
	for ($i=1; $i<=$n; $i++) {
		$result = $func();

		if ($returnResults) {
			$a[$i] = $result;
		}
	}

	return $a;
}

$ir = new InputReader();
$testsCount = $ir->readInt();
ntimes($testsCount, function() use ($ir) {
	$d = $ir->readInt();

	if ($d==0) {
		printf("Y %01.9f %01.9f\n", 0.0, 0.0);
	} else if ($d<4) {
		printf("N\n");
	} else {
		$discr = sqrt($d*$d/4 - $d);
		$b1 = $discr + $d/2;
		$b2 = -$discr + $d/2;
		$a1 = $d - $b1;
		$a2 = $d - $b2;

		if ($a1>=0 && $b1>=0) {
			printf("Y %01.9f %01.9f\n", $a1, $b1);
		} elseif ($a2>=0 && $b2>=0) {
			printf("Y %01.9f %01.9f\n", $a2, $b2);
		} else {
			printf("N\n");
		}
	}
});

<?php

class InputReader {
	protected $_fh;

	public function __construct($fileHandler = STDIN)
	{
		$this->_fh = $fileHandler;
	}

	public function readFloat()
	{
		$d = trim(fgets($this->_fh));

		return (float)$d;
	}

	public function readInt()
	{
		$d = trim(fgets($this->_fh));

		return (int)$d;
	}

	public function readString()
	{
		$s = trim(fgets($this->_fh));

		return $s;
	}

	public function readArrayOfInt($size, $indexFrom = 0)
	{
		$a = [];
		$ind = $indexFrom;
		foreach (explode(' ', fgets($this->_fh)) as $item) {
			$a[$ind++] = (int)$item;
		}

		return $a;
	}

	public function readArrayOfString($size, $indexFrom = 0)
	{
		$a = [];
		$ind = $indexFrom;
		foreach (explode(' ', fgets($this->_fh)) as $item) {
			$a[$ind++] = $item;
		}

		return $a;
	}
}

function ntimes($n, $func, $returnResults = false) {
	$a = [];
	for ($i=1; $i<=$n; $i++) {
		$result = $func();

		if ($returnResults) {
			$a[$i] = $result;
		}
	}

	return $a;
}

$ir = new InputReader();
$testsCount = $ir->readInt();
ntimes($testsCount, function() use ($ir) {
	$d = $ir->readInt();

	if ($d==0) {
		printf("YES %01.9f %01.9f\n", 0.0, 0.0);
	} else if ($d<4) {
		printf("NO\n");
	} else {
		$discr = sqrt($d*$d/4 - $d);
		$b1 = $discr + $d/2;
		$b2 = -$discr + $d/2;
		$a1 = $d - $b1;
		$a2 = $d - $b2;

		if ($a1>=0 && $b1>=0) {
			printf("YES %01.9f %01.9f\n", $a1, $b1);
		} elseif ($a2>=0 && $b2>=0) {
			printf("YES %01.9f %01.9f\n", $a2, $b2);
		} else {
			printf("NO\n");
		}
	}
});


<?php
$fl = STDIN;//fopen("input.txt","r");

$handleArray = preg_split("//ui", trim(fgets($fl)));
array_pop($handleArray);
array_shift($handleArray);
$columns = 0;
$lines = 0;
if(count($handleArray) <= 20){
    $columns = count($handleArray);
    $lines = 1;
} else {
    $lines = ceil(count($handleArray) / 20);
    $columns = ceil (count($handleArray) / $lines);
}
print((string)$lines . " " . (string)$columns . "\n");
$result = "";
$countArr = count($handleArray);
for($i = 0; $i < $lines; $i++){
    for($j = 0; $j < $columns; $j++){
        $result = $result . $handleArray[$i * $columns + $j];
        if($j == 0){
            if(($lines * $columns - $countArr) > $i){
                $result = $result . "*";
                $j++;
                array_unshift($handleArray, " ");
            }
        }
    }
    $result = $result . "\n";
}
print($result);

<?php
//define('STDIN', fopen('input.txt', 'r'));
$s = trim(fgets(STDIN));

$len = strlen($s);
$rowsCount = (int)ceil($len / 20);
$columnsCount = (int)ceil($len / $rowsCount);
$cellsInTable = $rowsCount * $columnsCount;
$fullRows = $rowsCount + $len - $cellsInTable;

echo( "$rowsCount $columnsCount\n" );

for ($numRow = 1, $pos = 0; $numRow <= $rowsCount; $numRow++) {
	if ($numRow <= $fullRows) {
		$substr = substr($s, $pos, $columnsCount);
		$pos += $columnsCount;
	} else {
		$substr = substr($s, $pos, $columnsCount-1) . '*';
		$pos += ($columnsCount - 1);
	}
	if ($numRow < $rowsCount) {
		echo("$substr\n");
	} else {
		echo("$substr");
	}
}

fclose(STDIN);

?>

<?php
/*****************************************/
class InputReader {protected $_fh;public function __construct($fileHandler = STDIN){$this->_fh = $fileHandler;}
	public function readInt() {$d = trim(fgets($this->_fh));return (int)$d;}
	public function readString() {$d = trim(fgets($this->_fh));return $d;}
	public function readArrayOfInt($size, $indexFrom = 0) {$a = [];$ind = $indexFrom;foreach (explode(' ', fgets($this->_fh)) as $item) {$a[$ind++] = (int)$item;}return $a;}
	public function readArrayOfFloat($size, $indexFrom = 0) {$a = [];$ind = $indexFrom;foreach (explode(' ', fgets($this->_fh)) as $item) {$a[$ind++] = (float)$item;}return $a;}
	public function readArrayOfString($size, $indexFrom = 0) {$a = [];$ind = $indexFrom;foreach (explode(' ', fgets($this->_fh)) as $item) {$a[$ind++] = $item;}return $a;}
}

/* Perform action N times. Can return values in array */
function ntimes($n, $func, $returnResults = false) {$a = [];for ($i=1; $i<=$n; $i++) {$result = $func();if ($returnResults) {$a[$i] = $result;}}return $a;}

/* Integral. Keys preserved. By reference. */
function cumsum(&$a){$sum = 0;foreach($a as $k=>$v) {$a[$k] += $sum;$sum = $a[$k];}}

/* Difference. Keys preserved. By reference. */
function diff(&$a){$prev = 0;foreach($a as $k=>$v) {$buf=$a[$k];$a[$k]-=$prev;$prev = $buf;}}

function bitCount($n){$cnt = 0;for ($j=$n; $j; $j>>=1){$cnt += $j&1;}return $cnt;}
/*****************************************/

$ir = new InputReader();

/* TASK */

$s = $ir->readString();
$n = strlen($s);

$r = intval($n/20);
if ($r*20 != $n) {
	$r++;
}

$c = 20;
$d = 20*$r - $n;
if ($d>0) {
	$c -= intval($d/$r);
}

echo "$r $c\n";
$stars = $c*$r - $n;
$start = 0;
for ($i = 1; $i<=$r; $i++) {
	if ($stars) {
		echo substr($s, $start, $c-1).'*'."\n";
		$start += $c-1;
		$stars--;
	} else {
		echo substr($s, $start, $c)."\n";
		$start += $c;
	}
}