class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: B = None
        self.x: G = None
        self.o: E = None
        self.r: J = None
        self.u: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: I = None
        self.t: B = None
        self.z: B = None
        self.q: I = None
        self.s: G = None
        self.y: I = None
        self.p: B = None
        self.r: A = None
        self.u: E = None
        self.x: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: D = None
        self.s: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: F = None
        self.x: D = None
        self.z: C = None
        self.y: B = None
        self.p: E = None
        self.s: I = None
        self.r: C = None
        self.u: B = None
        self.v: D = None
        self.w: G = None
        self.txt = txt

k = A("k")
n = B("n")
c = C("c")
g = D("g")
l = E("l")
j = F("j")
d = G("d")
a = H("a")
i = I("i")
e = J("e")

k.u = l
k.y = e
n.y = c
n.x = k
c.s = g
c.w = n
c.x = d
c.o = l
c.r = e
c.u = j
g.v = i
g.q = i
g.y = i
g.t = n
g.z = n
g.p = n
g.s = d
g.x = d
g.r = k
g.u = l
l.w = n
j.u = k
d.y = l
d.o = k
a.p = n
a.u = g
a.s = i
i.s = n
e.o = j
e.x = g
e.v = g
e.z = c
e.r = c
e.y = n
e.u = n
e.p = l
e.s = i
e.w = d
assert e.r.r.y.y.x.y.w.y.txt == "
class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: B = None
        self.x: G = None
        self.o: E = None
        self.r: J = None
        self.u: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: I = None
        self.t: B = None
        self.z: B = None
        self.q: I = None
        self.s: G = None
        self.y: I = None
        self.p: B = None
        self.r: A = None
        self.u: E = None
        self.x: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: D = None
        self.s: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: F = None
        self.x: D = None
        self.z: C = None
        self.y: B = None
        self.p: E = None
        self.s: I = None
        self.r: C = None
        self.u: B = None
        self.v: D = None
        self.w: G = None
        self.txt = txt

k = A("k")
n = B("n")
c = C("c")
g = D("g")
l = E("l")
j = F("j")
d = G("d")
a = H("a")
i = I("i")
e = J("e")

k.u = l
k.y = e
n.y = c
n.x = k
c.s = g
c.w = n
c.x = d
c.o = l
c.r = e
c.u = j
g.v = i
g.q = i
g.y = i
g.t = n
g.z = n
g.p = n
g.s = d
g.x = d
g.r = k
g.u = l
l.w = n
j.u = k
d.y = l
d.o = k
a.p = n
a.u = g
a.s = i
i.s = n
e.o = j
e.x = g
e.v = g
e.z = c
e.r = c
e.y = n
e.u = n
e.p = l
e.s = i
e.w = d
assert e.r.r.y.y.x.y.w.y.txt == "c"