class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: C = None
        self.q: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.y: D = None
        self.t: F = None
        self.x: F = None
        self.w: A = None
        self.u: G = None
        self.o: D = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: A = None
        self.r: A = None
        self.y: B = None
        self.p: B = None
        self.z: D = None
        self.s: H = None
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: F = None
        self.v: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.o: H = None
        self.z: F = None
        self.r: F = None
        self.t: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: D = None
        self.t: D = None
        self.w: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: E = None
        self.r: G = None
        self.o: F = None
        self.w: A = None
        self.y: G = None
        self.v: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.y: D = None
        self.t: F = None
        self.x: F = None
        self.w: A = None
        self.u: G = None
        self.o: D = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: A = None
        self.r: A = None
        self.y: B = None
        self.p: B = None
        self.z: D = None
        self.s: H = None
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: F = None
        self.v: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.o: H = None
        self.z: F = None
        self.r: F = None
        self.t: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: D = None
        self.t: D = None
        self.w: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: E = None
        self.r: G = None
        self.o: F = None
        self.w: A = None
        self.y: G = None
        self.v: D = None
        self.txt = txt

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

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