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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: C = None
        self.w: E = None
        self.p: B = None
        self.t: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: I = None
        self.t: I = None
        self.w: G = None
        self.r: E = None
        self.y: G = None
        self.o: D = None
        self.q: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: G = None
        self.q: B = None
        self.z: B = None
        self.txt = txt

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

l = A("l")
f = B("f")
h = C("h")
k = D("k")
j = E("j")
e = F("e")
c = G("c")
i = H("i")
d = I("d")
m = G("m")

l.z = k
l.t = k
l.u = h
l.p = f
l.v = d
f.q = l
f.w = j
h.y = j
k.y = j
k.w = j
k.r = h
k.p = f
k.t = f
j.s = c
e.o = i
c.p = d
c.t = d
c.w = m
c.y = m
c.r = j
c.o = k
c.q = l
i.w = e
i.s = c
i.q = f
i.z = f
d.t = f
d.w = e
d.v = i
d.q = i
m.p = d
m.t = d
m.w = c
m.y = c
m.r = j
m.o = k
m.q = l
assert l.z.p.w.s.t.t.q.txt == "
class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: C = None
        self.t: D = None
        self.p: B = None
        self.v: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: C = None
        self.w: E = None
        self.p: B = None
        self.t: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: I = None
        self.t: I = None
        self.w: G = None
        self.r: E = None
        self.y: G = None
        self.o: D = None
        self.q: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: G = None
        self.q: B = None
        self.z: B = None
        self.txt = txt

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

l = A("l")
f = B("f")
h = C("h")
k = D("k")
j = E("j")
e = F("e")
c = G("c")
i = H("i")
d = I("d")
m = G("m")

l.z = k
l.t = k
l.u = h
l.p = f
l.v = d
f.q = l
f.w = j
h.y = j
k.y = j
k.w = j
k.r = h
k.p = f
k.t = f
j.s = c
e.o = i
c.p = d
c.t = d
c.w = m
c.y = m
c.r = j
c.o = k
c.q = l
i.w = e
i.s = c
i.q = f
i.z = f
d.t = f
d.w = e
d.v = i
d.q = i
m.p = d
m.t = d
m.w = c
m.y = c
m.r = j
m.o = k
m.q = l
assert l.z.p.w.s.t.t.q.txt == "l"