@@ -0,0 +1,1337 @@
+class Element %7B%0A    private int%5B%5D oneLine;%0A    private int rank;%0A%0A    public Element(int%5B%5D input) %7B%0A%09boolean validElement = true;%0A%09for(int i = 0; i %3C input.length; i++) %7B%0A%09    if (Math.abs(i) %3E input.length) %7B%0A%09%09validElement = false;%0A%09    %7D%0A%09    for(int j = i + 1; j %3C input.length; j++) %7B%0A%09%09if (Math.abs(input%5Bj%5D) == Math.abs(input%5Bi%5D)) %7B%0A%09%09    validElement = false;%0A%09%09%7D%0A%09    %7D%0A%09%7D%0A%09if (validElement) %7B%0A%09    this.oneLine = new int%5Binput.length%5D;%0A%09    this.rank = input.length;%0A%09    for(int i = 0; i %3C input.length; i++) %7B%0A%09%09oneLine%5Bi%5D = input%5Bi%5D;%0A%09    %7D%0A%09%7D%0A%09else %7B%0A%09    System.out.println(%22Invalid element%22);%0A%09%7D%0A    %7D%0A%0A    private Element(int rank) %7B%0A%09this.rank = rank;%0A%09oneLine = new int%5Brank%5D;%0A    %7D%0A%0A    public int getRank() %7B%0A%09return rank;%0A    %7D%0A%0A    public int getSign(int origin) %7B%0A%09return Math.abs(oneLine%5Borigin - 1%5D)/oneLine%5Borigin -1%5D;%0A    %7D%0A%0A    public int mapsTo(int origin) %7B%0A%09if ((origin %3E= 1) & (origin %3C= rank))%0A%09    return oneLine%5Borigin - 1%5D;%0A%09return 0;%0A    %7D%0A%0A    public int mapsFrom(int target) %7B%0A%09for(int i = 0; i %3C rank; i++) %7B%0A%09    if(oneLine%5Bi%5D == target)%0A%09%09return i + 1;%0A%09%7D%0A%09return 0;%0A    %7D%0A%0A    public Element findInverse() %7B%0A%09Element inverse = new Element(this.rank);%0A%09for(int i = 0; i %3C rank; i++) %7B%0A%09    inverse.oneLine%5BMath.abs(this.oneLine%5Bi%5D)-1%5D = this.getSign(i+1)*(i+1);%0A    %09%7D%0A%09return inverse;%0A    %7D%0A%7D%0A

Add class for element