public static String parseOdd( String s, String var )
    {
        int x = 0;
        int y = 0;
        int k = 0;
        if( s.contains( "x" ) )
        {
            if( s.contains( "x^" ) )
            {
                k = s.indexOf( "x" );
                x = Integer.parseInt( s.substring( k+2, k+3 ) );
            }
            else
            {
                x = 1;
            }
        }
        else
        {
            x = 0;
        }
        if( s.contains( "y" ) )
        {
            if( s.contains( "y^" ) )
            {
                k = s.indexOf( "y" );
                y = Integer.parseInt( s.substring( k+2, k+3 ) );
            }
            else
            {
                y = 1;
            }
        }
        else
        {
            y = 0;
        }
        String str = "";
        if( var.equals( "x" ) )
        {
            if( (x-1) % 2 == 0 )
            {
                if( (x-1) == 0 )
                {
                    if( y == 0 )
                    {
                        str = "x^0";
                    }
                    else
                    {
                        str = "y^" + y;
                    }
                }
                else
                {
                    str += ("x^" + (x-1)/2);
                    if( y != 0 )
                    {
                        str += ("*y^" + y);
                    }
                }
            }
        }
        if( var.equals( "y" ) )
        {
            if( (y-1) % 2 == 0 )
            {
                if( x == 0 )
                {
                    if( (y-1) == 0 )
                    {
                        str = "x^0";
                    }
                    else
                    {
                        str = "y^" + (y-1)/2;
                    }
                }
                else
                {
                    str += ("x^" + x);
                    if( (y-1) != 0 )
                    {
                        str += ("*y^" + (y-1)/2);
                    }
                }
            }
        }
        str = str.replace( "x^1", "x" );
        str = str.replace( "y^1", "y" );
        return str;
    }