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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: G = None
        self.t: J = None
        self.u: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.y: H = None
        self.z: D = None
        self.t: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: I = None
        self.u: E = None
        self.q: I = None
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: E = None
        self.r: C = None
        self.o: F = None
        self.q: A = None
        self.v: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: H = None
        self.y: G = None
        self.r: F = None
        self.v: J = None
        self.q: A = None
        self.u: A = None
        self.z: B = None
        self.txt = txt

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

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

c.u = i
c.q = n
c.t = n
c.z = k
c.r = l
c.w = l
c.x = m
c.p = j
b.z = l
b.x = j
b.u = j
b.t = m
h.q = f
h.o = f
h.y = i
l.s = k
l.w = k
l.p = k
l.z = c
l.u = i
l.y = f
l.t = f
i.v = j
i.w = j
i.z = n
i.t = n
i.o = l
i.q = k
i.y = k
i.u = c
i.x = b
i.r = h
n.q = b
n.t = b
n.y = k
n.z = l
j.r = f
j.q = f
j.u = i
j.z = h
k.y = n
k.o = n
k.u = i
k.r = h
k.q = c
k.v = j
f.o = k
f.y = j
f.r = n
f.v = m
f.q = c
f.u = c
f.z = b
m.p = c
assert m.p.t.q.txt == "
class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: F = None
        self.z: H = None
        self.r: D = None
        self.x: J = None
        self.p: G = None
        self.t: F = None
        self.w: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: G = None
        self.t: J = None
        self.u: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.y: H = None
        self.z: D = None
        self.t: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: I = None
        self.u: E = None
        self.q: I = None
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: E = None
        self.r: C = None
        self.o: F = None
        self.q: A = None
        self.v: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: H = None
        self.y: G = None
        self.r: F = None
        self.v: J = None
        self.q: A = None
        self.u: A = None
        self.z: B = None
        self.txt = txt

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

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

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