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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: E = None
        self.s: E = None
        self.q: C = None
        self.y: D = None
        self.u: E = None
        self.txt = txt

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

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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: E = None
        self.s: E = None
        self.q: C = None
        self.y: D = None
        self.u: E = None
        self.txt = txt

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

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