class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: E = None
        self.p: J = None
        self.y: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.p: H = None
        self.z: B = None
        self.v: A = None
        self.q: H = None
        self.x: J = None
        self.s: G = None
        self.t: E = None
        self.y: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: C = None
        self.u: C = None
        self.o: J = None
        self.z: G = None
        self.w: H = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.z: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: I = None
        self.q: J = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.p: H = None
        self.z: B = None
        self.v: A = None
        self.q: H = None
        self.x: J = None
        self.s: G = None
        self.t: E = None
        self.y: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: C = None
        self.u: C = None
        self.o: J = None
        self.z: G = None
        self.w: H = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.z: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: I = None
        self.q: J = None
        self.txt = txt

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

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

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

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

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

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