# Cyclic Polyglot Challenge

This is the robbers thread. You can find the cops thread here.

## Cyclic Polyglot

A N-element cyclic polyglot is a complete program that can be run in N different languages. In each language, when the program is run with no input (possibly subject to this exception), it should print the name of a language to STDOUT. Specifically, if the program is run in the Kth language, it should print the name of the (K+1)th language. If the program is run in the Nth language (that is, the final language in an N-element cycle), it should print the name of the first language.

An example might be useful.

a = [[ v = 7, puts('Befunge') ]]
__END__
= print("Ruby")
-->*+:292*++,,@
--3    9
--7    *
--^,:-5<


Running this program with Lua prints the string "Ruby". Running this program in Ruby prints the string "Befunge". Running this program in Befunge prints the string "Lua", completing the cycle. This program constitutes a 3-cycle consisting of Lua, Ruby, and Befunge.

The same language cannot appear twice in a cycle, and different versions of the same language (such as Python 2 and Python 3) cannot appear in the same cycle as one another.

## Cops

Your challenge is to write an N-cyclic polyglot, where N is at least 2. Then, you must add, replace, and delete some number of characters to the program to produce an M-cyclic polyglot, where M is strictly greater than N. You should then post the shorter, N-cyclic polyglot (and the languages it runs in), as well as the number of characters you changed to produce the longer polyglot. Your score is N, the number of languages in your shorter cycle.

The robbers will try to identify your longer cycle. If, after seven days, no one has successfully cracked your solution, you should edit your answer declaring that it is safe. You should also post your longer M-cyclic polyglot at this time.

## Robbers

Given a cop's N-cyclic polyglot and the number of characters they added to produce a larger polyglot cycle, your goal is to produce that larger cycle. If you can produce a longer cycle by adding, deleting, or replacing as many characters as the cop did or fewer characters, you have cracked the cop's polyglot. Your score is the length of the new cycle you've created. Your new polyglot need not be the same as or even similar to the cop's secret polyglot; it only needs to be larger than their existing one.

Your solution may also be cracked. If another robber comes along and produces a cycle strictly longer than yours, starting from the same cop's polyglot, they have stolen your points.

## Valid Programming Languages

Since this challenge indirectly involves guessing programming languages used by other participant's, the definition of a programming language for the purposes of this challenge will be a little more strict than the usual definition. A programming language used in this challenge must satisfy all of the following conditions.

## Final Notes

• The code you write should be a standalone program in every language that it is intended to run in. Functions or code snippets are not allowed.
• Your program will be given no input through STDIN. Likewise, your program should print nothing to STDERR.
• A cop's score is the number of languages in the cycle of the polyglot they posted. The cop should post the languages that the posted polyglot runs correctly in, as well as the number of characters they added to produce a longer polyglot. They are not responsible for posting the languages the longer, hidden polyglot runs in until their answer is safe.
• A robber's score is the number of languages the modified polyglot runs in. As with the cop, the robber should post the list of languages the polyglot runs correctly in.
• The number of characters changed should be computed in Levenshtein distance.

# mdahmoune, added Ruby, Levenshtein = 10

#include<stdio.h>
#define print(a) main(){int z[1];if(sizeof(0,z)==4)printf("C(gcc)");else printf("Perl5");}
print(\$=?"Ruby":"C++(gcc)")


Cycle is C -> Perl5 -> Ruby -> C++ -> C

I don't really know what I did (and I really don't know why it's valid in C and C++), I just ripped it off this answer.

C (gcc): Try it online!

Perl5: Try it online!

Ruby: Try it online!

C++ (gcc): Try it online!