class A:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: J = None
        self.s: D = None
        self.p: D = None
        self.w: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: C = None
        self.r: J = None
        self.x: J = None
        self.o: G = None
        self.z: H = None
        self.y: C = None
        self.q: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: J = None
        self.r: I = None
        self.z: E = None
        self.o: G = None
        self.q: G = None
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: C = None
        self.v: B = None
        self.q: A = None
        self.w: G = None
        self.y: A = None
        self.r: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: F = None
        self.y: F = None
        self.o: C = None
        self.x: E = None
        self.w: B = None
        self.q: B = None
        self.z: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: J = None
        self.w: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.y: A = None
        self.p: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: C = None
        self.r: J = None
        self.x: J = None
        self.o: G = None
        self.z: H = None
        self.y: C = None
        self.q: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: J = None
        self.r: I = None
        self.z: E = None
        self.o: G = None
        self.q: G = None
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: C = None
        self.v: B = None
        self.q: A = None
        self.w: G = None
        self.y: A = None
        self.r: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: F = None
        self.y: F = None
        self.o: C = None
        self.x: E = None
        self.w: B = None
        self.q: B = None
        self.z: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: J = None
        self.w: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.y: A = None
        self.p: C = None
        self.txt = txt

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

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

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