class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: F = None
        self.w: H = None
        self.z: B = None
        self.u: B = None
        self.p: F = None
        self.y: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: E = None
        self.r: I = None
        self.p: I = None
        self.v: I = None
        self.o: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: H = None
        self.x: C = None
        self.v: A = None
        self.z: F = None
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: I = None
        self.q: C = None
        self.z: J = None
        self.s: G = None
        self.r: G = None
        self.x: E = None
        self.y: C = None
        self.u: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.t: G = None
        self.v: I = None
        self.q: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: C = None
        self.w: G = None
        self.r: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: E = None
        self.r: I = None
        self.p: I = None
        self.v: I = None
        self.o: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: H = None
        self.x: C = None
        self.v: A = None
        self.z: F = None
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: I = None
        self.q: C = None
        self.z: J = None
        self.s: G = None
        self.r: G = None
        self.x: E = None
        self.y: C = None
        self.u: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.t: G = None
        self.v: I = None
        self.q: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: C = None
        self.w: G = None
        self.r: D = None
        self.txt = txt

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

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