class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: F = None
        self.o: G = None
        self.r: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.u: I = None
        self.s: D = None
        self.z: H = None
        self.w: I = None
        self.v: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: I = None
        self.z: D = None
        self.s: H = None
        self.t: F = None
        self.p: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: I = None
        self.y: A = None
        self.z: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.z: B = None
        self.r: A = None
        self.o: C = None
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: I = None
        self.x: G = None
        self.p: C = None
        self.s: B = None
        self.r: A = None
        self.q: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.u: I = None
        self.r: D = None
        self.t: B = None
        self.p: B = None
        self.z: B = None
        self.v: E = None
        self.x: E = None
        self.w: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.u: H = None
        self.w: G = None
        self.p: F = None
        self.t: B = None
        self.y: B = None
        self.r: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.u: I = None
        self.s: D = None
        self.z: H = None
        self.w: I = None
        self.v: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: I = None
        self.z: D = None
        self.s: H = None
        self.t: F = None
        self.p: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: I = None
        self.y: A = None
        self.z: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.z: B = None
        self.r: A = None
        self.o: C = None
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: I = None
        self.x: G = None
        self.p: C = None
        self.s: B = None
        self.r: A = None
        self.q: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.u: I = None
        self.r: D = None
        self.t: B = None
        self.p: B = None
        self.z: B = None
        self.v: E = None
        self.x: E = None
        self.w: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.u: H = None
        self.w: G = None
        self.p: F = None
        self.t: B = None
        self.y: B = None
        self.r: D = None
        self.txt = txt

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

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