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

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

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

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.t: E = None
        self.r: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: J = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: A = None
        self.y: G = None
        self.q: C = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.t: E = None
        self.r: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: J = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: A = None
        self.y: G = None
        self.q: C = None
        self.txt = txt

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

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

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