class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.q: F = None
        self.t: G = None
        self.y: G = None
        self.z: D = None
        self.r: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.y: A = None
        self.r: F = None
        self.p: B = None
        self.o: D = None
        self.w: A = None
        self.s: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: J = None
        self.y: A = None
        self.u: J = None
        self.r: G = None
        self.x: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: I = None
        self.w: I = None
        self.o: A = None
        self.v: H = None
        self.r: E = None
        self.x: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: B = None
        self.w: E = None
        self.u: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.q: F = None
        self.t: G = None
        self.y: G = None
        self.z: D = None
        self.r: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.y: A = None
        self.r: F = None
        self.p: B = None
        self.o: D = None
        self.w: A = None
        self.s: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: J = None
        self.y: A = None
        self.u: J = None
        self.r: G = None
        self.x: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: I = None
        self.w: I = None
        self.o: A = None
        self.v: H = None
        self.r: E = None
        self.x: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: B = None
        self.w: E = None
        self.u: G = None
        self.txt = txt

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

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

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