class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: J = None
        self.s: J = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: G = None
        self.t: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: J = None
        self.t: H = None
        self.o: G = None
        self.s: I = None
        self.u: J = None
        self.q: G = None
        self.w: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: A = None
        self.o: B = None
        self.r: B = None
        self.u: C = None
        self.s: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: A = None
        self.r: H = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: G = None
        self.t: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: J = None
        self.t: H = None
        self.o: G = None
        self.s: I = None
        self.u: J = None
        self.q: G = None
        self.w: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: A = None
        self.o: B = None
        self.r: B = None
        self.u: C = None
        self.s: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: A = None
        self.r: H = None
        self.txt = txt

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

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

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