class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.t: I = None
        self.w: H = None
        self.s: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: J = None
        self.t: B = None
        self.o: B = None
        self.u: J = None
        self.y: F = None
        self.p: J = None
        self.w: I = None
        self.s: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: J = None
        self.s: G = None
        self.t: J = None
        self.q: C = None
        self.u: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: J = None
        self.q: D = None
        self.w: F = None
        self.p: A = None
        self.t: J = None
        self.o: A = None
        self.y: J = None
        self.z: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: I = None
        self.z: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.t: I = None
        self.w: H = None
        self.s: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: J = None
        self.t: B = None
        self.o: B = None
        self.u: J = None
        self.y: F = None
        self.p: J = None
        self.w: I = None
        self.s: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: J = None
        self.s: G = None
        self.t: J = None
        self.q: C = None
        self.u: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: J = None
        self.q: D = None
        self.w: F = None
        self.p: A = None
        self.t: J = None
        self.o: A = None
        self.y: J = None
        self.z: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: I = None
        self.z: I = None
        self.txt = txt

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

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