class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.v: D = None
        self.o: B = None
        self.s: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: I = None
        self.x: F = None
        self.p: B = None
        self.z: A = None
        self.r: D = None
        self.t: I = None
        self.q: I = None
        self.v: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: H = None
        self.q: C = None
        self.u: F = None
        self.x: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.s: A = None
        self.r: A = None
        self.y: D = None
        self.z: B = None
        self.x: B = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: C = None
        self.z: A = None
        self.t: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: G = None
        self.q: I = None
        self.x: D = None
        self.p: C = None
        self.r: F = None
        self.v: A = None
        self.w: G = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: I = None
        self.x: F = None
        self.p: B = None
        self.z: A = None
        self.r: D = None
        self.t: I = None
        self.q: I = None
        self.v: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: H = None
        self.q: C = None
        self.u: F = None
        self.x: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.s: A = None
        self.r: A = None
        self.y: D = None
        self.z: B = None
        self.x: B = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: C = None
        self.z: A = None
        self.t: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: G = None
        self.q: I = None
        self.x: D = None
        self.p: C = None
        self.r: F = None
        self.v: A = None
        self.w: G = None
        self.txt = txt

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

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

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