fork(3) download
  1. import std.range, std.stdio, std.string;
  2. void main () {
  3. string s = readln.strip;
  4. string t = s;
  5. if (s.length % 2 == 0) t ~= 'b';
  6. t.repeat(6).join.drop(s.length).writeln;
  7. }
  8.  
Success #stdin #stdout 0s 16424KB
stdin
rrrrrl
stdout
brrrrrlbrrrrrlbrrrrrlbrrrrrlbrrrrrlb