class A:
    def __init__(self, txt: str):
        self.q: I = None
        self.w: B = None
        self.s: J = None
        self.p: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: A = None
        self.y: A = None
        self.v: H = None
        self.o: J = None
        self.t: H = None
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.p: J = None
        self.x: C = None
        self.t: A = None
        self.v: C = None
        self.y: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.q: I = None
        self.s: C = None
        self.v: D = None
        self.z: A = None
        self.p: E = None
        self.txt = txt

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

k.q = c
k.w = l
k.s = n
k.p = m
l.s = h
d.s = f
d.v = f
e.s = c
h.r = d
h.q = k
h.y = k
h.u = k
h.v = m
h.t = m
h.o = n
a.s = m
a.p = n
a.x = d
a.v = d
a.t = k
a.y = l
f.q = l
m.u = c
c.u = n
c.v = n
c.q = l
c.p = h
c.o = a
c.t = e
n.q = c
n.s = d
n.v = e
n.z = k
n.p = h
assert f.q.s.y.s.z.q.p.txt == "
class A:
    def __init__(self, txt: str):
        self.q: I = None
        self.w: B = None
        self.s: J = None
        self.p: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: A = None
        self.y: A = None
        self.v: H = None
        self.o: J = None
        self.t: H = None
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.p: J = None
        self.x: C = None
        self.t: A = None
        self.v: C = None
        self.y: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.q: I = None
        self.s: C = None
        self.v: D = None
        self.z: A = None
        self.p: E = None
        self.txt = txt

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

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