1895 稀疏矩阵


Submit solution

Points: 100
Time limit: 1.0s
Memory limit: 32M

Problem types
Allowed languages
C, C++, Java, Python

Description

本题的任务是打印稀稀拉拉的矩阵,俗称打印“稀疏矩阵”。稀疏矩阵的稀疏程度由稀疏系数决定。稀疏系数为一个整数,表示每行每列之间的间隔字符数或行数。

Input

若干组数据,每组数据由行数n和列数m(0<n,m<11)、矩阵填充字符c(可见字符)、稀疏系数s(0≤s≤9),构成。

Output

对应每组数据,输出一个“稀疏矩阵”。每个“稀疏矩阵”之间空一行。

Sample

Input

2 3 A 2
3 4 B 1

Output

A  A  A


A  A  A

B B B B

B B B B

B B B B

Comments

There are no comments at the moment.