class A:
    def __init__(self, txt: str):
        self.y: H = None
        self.q: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: E = None
        self.w: D = None
        self.y: I = None
        self.s: A = None
        self.t: E = None
        self.p: I = None
        self.x: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: G = None
        self.z: G = None
        self.q: I = None
        self.u: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: B = None
        self.x: A = None
        self.u: C = None
        self.r: D = None
        self.v: J = None
        self.w: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: G = None
        self.p: B = None
        self.t: A = None
        self.r: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: I = None
        self.s: I = None
        self.p: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: E = None
        self.w: D = None
        self.y: I = None
        self.s: A = None
        self.t: E = None
        self.p: I = None
        self.x: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: G = None
        self.z: G = None
        self.q: I = None
        self.u: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: B = None
        self.x: A = None
        self.u: C = None
        self.r: D = None
        self.v: J = None
        self.w: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: G = None
        self.p: B = None
        self.t: A = None
        self.r: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: I = None
        self.s: I = None
        self.p: H = None
        self.txt = txt

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

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