class A:
    def __init__(self, txt: str):
        self.t: H = None
        self.p: B = None
        self.w: E = None
        self.r: G = None
        self.v: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: G = None
        self.p: G = None
        self.y: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: G = None
        self.t: B = None
        self.x: G = None
        self.o: C = None
        self.txt = txt

m = A("m")
h = B("h")
l = C("l")
n = D("n")
g = E("g")
k = F("k")
b = G("b")
e = H("e")

m.t = e
m.p = h
m.v = h
m.w = g
m.r = b
h.o = e
l.s = g
l.u = h
n.r = b
n.t = b
n.p = b
n.y = e
g.v = l
g.r = k
g.u = k
g.t = m
g.p = e
k.z = n
k.v = l
k.o = e
b.x = e
b.s = m
b.t = l
e.r = l
e.o = l
e.z = b
e.x = b
e.t = h
assert l.u.o.z.txt == "
class A:
    def __init__(self, txt: str):
        self.t: H = None
        self.p: B = None
        self.w: E = None
        self.r: G = None
        self.v: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: G = None
        self.p: G = None
        self.y: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: G = None
        self.t: B = None
        self.x: G = None
        self.o: C = None
        self.txt = txt

m = A("m")
h = B("h")
l = C("l")
n = D("n")
g = E("g")
k = F("k")
b = G("b")
e = H("e")

m.t = e
m.p = h
m.v = h
m.w = g
m.r = b
h.o = e
l.s = g
l.u = h
n.r = b
n.t = b
n.p = b
n.y = e
g.v = l
g.r = k
g.u = k
g.t = m
g.p = e
k.z = n
k.v = l
k.o = e
b.x = e
b.s = m
b.t = l
e.r = l
e.o = l
e.z = b
e.x = b
e.t = h
assert l.u.o.z.txt == "b"