class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: G = None
        self.u: B = None
        self.r: E = None
        self.p: F = None
        self.x: G = None
        self.v: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.v: H = None
        self.y: C = None
        self.u: A = None
        self.w: F = None
        self.z: G = None
        self.o: C = None
        self.p: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: F = None
        self.u: F = None
        self.s: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: C = None
        self.u: C = None
        self.q: G = None
        self.z: D = None
        self.o: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.v: H = None
        self.y: C = None
        self.u: A = None
        self.w: F = None
        self.z: G = None
        self.o: C = None
        self.p: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: F = None
        self.u: F = None
        self.s: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: C = None
        self.u: C = None
        self.q: G = None
        self.z: D = None
        self.o: D = None
        self.txt = txt

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

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