5331: LCS

内存限制:512 MB 时间限制:1.000 S
评测方式:文本比较 命题人:
提交:2 解决:1

题目描述

Let LCS(s1,s2), LCS(s1,s2) denote the length of the longest common subsequence (not necessary continuity) of string s1 and string s2.
Now give you four integers a,b,c,n, you need to find three lowercase character strings s1,s2,s3 satisfy that ∣s1∣=∣s2∣=∣s3∣=n.  
and  LCS(s1,s2)=a, LCS(s2,s3)=b, LCS(s1,s3)=c.

输入

The first line has four integers a,b,c,n.
0≤a,b,c≤n, 1≤n≤1000.

输出

If there is no solution, output "NO" (without double quotation marks).
If there exists solutions, you only need to output any one: output three lines, the i-th line has one strings si.

样例输入 复制

1 2 3 4

样例输出 复制

aqcc
abpp
abcc