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

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

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.u: B = None
        self.v: E = None
        self.r: E = None
        self.o: H = None
        self.p: A = None
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

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

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

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

i = A("i")
m = B("m")
l = C("l")
e = D("e")
f = E("f")
g = F("g")
c = G("c")
b = H("b")
a = C("a")

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.u: B = None
        self.v: E = None
        self.r: E = None
        self.o: H = None
        self.p: A = None
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

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

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

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

i = A("i")
m = B("m")
l = C("l")
e = D("e")
f = E("f")
g = F("g")
c = G("c")
b = H("b")
a = C("a")

i.z = a
m.u = a
m.x = e
l.v = m
l.x = g
l.o = b
l.t = i
l.s = c
e.t = g
e.u = m
e.v = f
e.r = f
e.o = b
e.p = i
e.y = i
f.y = i
g.s = e
g.q = m
c.v = m
c.s = f
c.z = f
c.u = b
b.s = e
a.v = m
a.x = g
a.o = b
a.t = i
a.s = c
assert e.p.z.x.s.u.u.v.txt == "m"