class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: B = None
        self.s: I = None
        self.w: H = None
        self.o: D = None
        self.u: D = None
        self.p: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: I = None
        self.w: I = None
        self.u: C = None
        self.y: C = None
        self.q: H = None
        self.z: H = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: I = None
        self.s: B = None
        self.q: F = None
        self.x: B = None
        self.o: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: E = None
        self.x: G = None
        self.v: E = None
        self.s: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: F = None
        self.o: G = None
        self.p: C = None
        self.t: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: E = None
        self.s: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: F = None
        self.w: I = None
        self.r: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: D = None
        self.s: C = None
        self.o: C = None
        self.w: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: I = None
        self.w: I = None
        self.u: C = None
        self.y: C = None
        self.q: H = None
        self.z: H = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: I = None
        self.s: B = None
        self.q: F = None
        self.x: B = None
        self.o: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: E = None
        self.x: G = None
        self.v: E = None
        self.s: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: F = None
        self.o: G = None
        self.p: C = None
        self.t: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: E = None
        self.s: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: F = None
        self.w: I = None
        self.r: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: D = None
        self.s: C = None
        self.o: C = None
        self.w: H = None
        self.txt = txt

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

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