class A:
    def __init__(self, txt: str):
        self.p: H = None
        self.q: J = None
        self.z: F = None
        self.x: H = None
        self.y: G = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: J = None
        self.s: J = None
        self.u: F = None
        self.v: I = None
        self.y: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.r: D = None
        self.q: D = None
        self.u: F = None
        self.w: C = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: J = None
        self.s: J = None
        self.u: F = None
        self.v: I = None
        self.y: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.r: D = None
        self.q: D = None
        self.u: F = None
        self.w: C = None
        self.txt = txt

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

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

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