class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: E = None
        self.z: D = None
        self.r: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.x: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.q: D = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.u: E = None
        self.z: H = None
        self.w: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: G = None
        self.z: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.x: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.q: D = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.u: E = None
        self.z: H = None
        self.w: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: G = None
        self.z: D = None
        self.txt = txt

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

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