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

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

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

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.s: C = None
        self.v: D = None
        self.x: A = None
        self.t: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: B = None
        self.s: F = None
        self.q: C = None
        self.z: E = None
        self.r: E = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.s: C = None
        self.v: D = None
        self.x: A = None
        self.t: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: B = None
        self.s: F = None
        self.q: C = None
        self.z: E = None
        self.r: E = None
        self.txt = txt

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

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

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