class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: J = None
        self.z: E = None
        self.r: I = None
        self.y: B = None
        self.s: B = None
        self.o: I = None
        self.t: H = None
        self.x: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.u: D = None
        self.x: D = None
        self.s: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.p: J = None
        self.x: E = None
        self.u: J = None
        self.t: D = None
        self.q: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: F = None
        self.o: A = None
        self.p: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.z: I = None
        self.p: I = None
        self.s: C = None
        self.o: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.w: E = None
        self.o: C = None
        self.y: G = None
        self.v: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: C = None
        self.v: E = None
        self.w: H = None
        self.y: C = None
        self.r: C = None
        self.o: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.u: D = None
        self.x: D = None
        self.s: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.p: J = None
        self.x: E = None
        self.u: J = None
        self.t: D = None
        self.q: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: F = None
        self.o: A = None
        self.p: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.z: I = None
        self.p: I = None
        self.s: C = None
        self.o: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.w: E = None
        self.o: C = None
        self.y: G = None
        self.v: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: C = None
        self.v: E = None
        self.w: H = None
        self.y: C = None
        self.r: C = None
        self.o: I = None
        self.txt = txt

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

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