class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: C = None
        self.y: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.z: B = None
        self.q: E = None
        self.o: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: B = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.z: B = None
        self.txt = txt

f = A("f")
h = B("h")
e = C("e")
g = D("g")
a = E("a")
m = F("m")
b = C("b")
i = E("i")
l = D("l")
n = C("n")

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.z: B = None
        self.q: E = None
        self.o: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: B = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.z: B = None
        self.txt = txt

f = A("f")
h = B("h")
e = C("e")
g = D("g")
a = E("a")
m = F("m")
b = C("b")
i = E("i")
l = D("l")
n = C("n")

f.w = m
f.u = b
f.y = l
h.t = b
h.z = f
h.o = f
e.z = m
e.v = g
g.y = i
g.q = i
g.o = i
g.z = h
a.x = f
a.r = h
a.z = n
m.r = g
m.z = h
b.z = m
b.v = g
i.x = f
i.r = h
i.z = b
l.y = a
l.q = a
l.z = h
l.o = i
n.z = m
n.v = g
assert i.z.v.o.r.z.u.z.z.txt == "h"