class A:
    def __init__(self, txt: str):
        self.y: J = None
        self.q: C = None
        self.v: J = None
        self.p: G = None
        self.t: C = None
        self.z: H = None
        self.o: G = None
        self.s: G = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.o: C = None
        self.v: D = None
        self.w: A = None
        self.x: J = None
        self.t: A = None
        self.q: J = None
        self.r: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.s: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: D = None
        self.r: C = None
        self.z: A = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.o: C = None
        self.v: D = None
        self.w: A = None
        self.x: J = None
        self.t: A = None
        self.q: J = None
        self.r: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.s: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: D = None
        self.r: C = None
        self.z: A = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

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

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