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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: E = None
        self.p: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: F = None
        self.o: C = None
        self.w: G = None
        self.t: B = None
        self.y: G = None
        self.x: B = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: G = None
        self.v: C = None
        self.q: D = None
        self.r: A = None
        self.txt = txt

a = A("a")
e = B("e")
m = C("m")
d = D("d")
k = E("k")
g = F("g")
l = G("l")
j = H("j")
c = C("c")

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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: E = None
        self.p: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: F = None
        self.o: C = None
        self.w: G = None
        self.t: B = None
        self.y: G = None
        self.x: B = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: G = None
        self.v: C = None
        self.q: D = None
        self.r: A = None
        self.txt = txt

a = A("a")
e = B("e")
m = C("m")
d = D("d")
k = E("k")
g = F("g")
l = G("l")
j = H("j")
c = C("c")

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