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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.q: H = None
        self.y: E = None
        self.z: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: I = None
        self.v: H = 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.s: C = None
        self.u: G = None
        self.t: A = None
        self.q: A = None
        self.x: A = None
        self.y: A = None
        self.w: B = None
        self.z: G = None
        self.r: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: I = None
        self.x: D = None
        self.y: C = None
        self.t: F = None
        self.s: E = None
        self.w: G = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: E = None
        self.x: I = None
        self.t: I = None
        self.p: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: C = None
        self.o: B = None
        self.x: F = None
        self.u: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.q: H = None
        self.y: E = None
        self.z: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: I = None
        self.v: H = 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.s: C = None
        self.u: G = None
        self.t: A = None
        self.q: A = None
        self.x: A = None
        self.y: A = None
        self.w: B = None
        self.z: G = None
        self.r: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: I = None
        self.x: D = None
        self.y: C = None
        self.t: F = None
        self.s: E = None
        self.w: G = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: E = None
        self.x: I = None
        self.t: I = None
        self.p: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: C = None
        self.o: B = None
        self.x: F = None
        self.u: B = None
        self.txt = txt

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

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