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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: J = None
        self.u: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.t: F = None
        self.q: D = None
        self.s: A = None
        self.u: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: D = None
        self.u: H = None
        self.r: J = None
        self.w: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: H = None
        self.t: B = None
        self.z: C = None
        self.u: B = None
        self.y: I = None
        self.q: F = None
        self.p: E = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: J = None
        self.u: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.t: F = None
        self.q: D = None
        self.s: A = None
        self.u: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: D = None
        self.u: H = None
        self.r: J = None
        self.w: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: H = None
        self.t: B = None
        self.z: C = None
        self.u: B = None
        self.y: I = None
        self.q: F = None
        self.p: E = None
        self.txt = txt

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

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