class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: J = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.r: G = None
        self.u: B = None
        self.z: J = None
        self.w: B = None
        self.x: G = None
        self.y: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.p: E = None
        self.q: E = None
        self.v: D = None
        self.t: F = None
        self.u: F = None
        self.w: D = None
        self.x: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: I = None
        self.w: F = None
        self.t: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: J = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.r: G = None
        self.u: B = None
        self.z: J = None
        self.w: B = None
        self.x: G = None
        self.y: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.p: E = None
        self.q: E = None
        self.v: D = None
        self.t: F = None
        self.u: F = None
        self.w: D = None
        self.x: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: I = None
        self.w: F = None
        self.t: C = None
        self.txt = txt

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

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