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

class B:
    def __init__(self, txt: str):
        self.r: J = None
        self.w: E = None
        self.x: G = None
        self.y: D = None
        self.u: F = None
        self.s: C = None
        self.p: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: F = None
        self.t: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: F = None
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: J = None
        self.v: H = None
        self.q: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.r: B = None
        self.y: B = None
        self.x: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: J = None
        self.w: E = None
        self.x: G = None
        self.y: D = None
        self.u: F = None
        self.s: C = None
        self.p: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: F = None
        self.t: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: F = None
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: J = None
        self.v: H = None
        self.q: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.r: B = None
        self.y: B = None
        self.x: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

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

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

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