# Return to Answer

3 deleted 2 characters in body

## Ruby, 137135 bytes

g=gets
puts g.nil?? 0:[*0..s=g.size].permutation.map{|a|a.zip(g.chars)*""if s.times.map{|i|eval a[i].to_s+g[i]+a[i+1].to_s|i|eval"%s"*3%[a[i],g[i],a[i+1]]}.all?}.compact


Note: Time complexity is large (O(n!)).

## Ruby, 137 bytes

g=gets
puts g.nil?? 0:[*0..s=g.size].permutation.map{|a|a.zip(g.chars)*""if s.times.map{|i|eval a[i].to_s+g[i]+a[i+1].to_s}.all?}.compact


Note: Time complexity is large (O(n!)).

## Ruby, 135 bytes

g=gets
puts g.nil?? 0:[*0..s=g.size].permutation.map{|a|a.zip(g.chars)*""if s.times.map{|i|eval"%s"*3%[a[i],g[i],a[i+1]]}.all?}.compact


Note: Time complexity is large (O(n!)).

2 deleted 5 characters in body

## Ruby, 143137 bytes

g=gets
puts g.nil?? 0:[*0..s=g.size].permutation.map{|a|a.zip(g.scan /./chars).join if*""if s.times.map{|i|eval a[i].to_s+g[i]+a[i+1].to_s}.all?}.compact


Note: Time complexity is large (O(n!)).

## Ruby, 143 bytes

g=gets
puts g.nil?? 0:[*0..s=g.size].permutation.map{|a|a.zip(g.scan /./).join if s.times.map{|i|eval a[i].to_s+g[i]+a[i+1].to_s}.all?}.compact


Note: Time complexity is large (O(n!)).

## Ruby, 137 bytes

g=gets
puts g.nil?? 0:[*0..s=g.size].permutation.map{|a|a.zip(g.chars)*""if s.times.map{|i|eval a[i].to_s+g[i]+a[i+1].to_s}.all?}.compact


Note: Time complexity is large (O(n!)).

1

## Ruby, 143 bytes

g=gets
puts g.nil?? 0:[*0..s=g.size].permutation.map{|a|a.zip(g.scan /./).join if s.times.map{|i|eval a[i].to_s+g[i]+a[i+1].to_s}.all?}.compact


Note: Time complexity is large (O(n!)).