class A:
    def __init__(self, txt: str):
        self.w: G = None
        self.t: C = None
        self.u: E = None
        self.o: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: D = None
        self.r: C = None
        self.t: F = None
        self.z: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: F = None
        self.w: C = None
        self.o: J = None
        self.p: E = None
        self.u: E = None
        self.x: J = None
        self.v: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.w: B = None
        self.y: F = None
        self.p: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: D = None
        self.o: E = None
        self.z: I = None
        self.s: J = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.z: A = None
        self.q: A = None
        self.t: A = None
        self.r: H = None
        self.w: H = None
        self.y: A = None
        self.p: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: J = None
        self.y: D = None
        self.o: I = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: D = None
        self.r: C = None
        self.t: F = None
        self.z: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: F = None
        self.w: C = None
        self.o: J = None
        self.p: E = None
        self.u: E = None
        self.x: J = None
        self.v: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.w: B = None
        self.y: F = None
        self.p: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: D = None
        self.o: E = None
        self.z: I = None
        self.s: J = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.z: A = None
        self.q: A = None
        self.t: A = None
        self.r: H = None
        self.w: H = None
        self.y: A = None
        self.p: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: J = None
        self.y: D = None
        self.o: I = None
        self.txt = txt

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

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

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

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