class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: D = None
        self.s: B = None
        self.w: B = None
        self.x: D = None
        self.y: F = None
        self.u: H = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: J = None
        self.o: J = None
        self.s: I = None
        self.v: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.w: D = None
        self.s: A = None
        self.u: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: A = None
        self.o: C = None
        self.w: J = None
        self.s: B = None
        self.t: C = None
        self.q: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: H = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: J = None
        self.o: J = None
        self.s: I = None
        self.v: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.w: D = None
        self.s: A = None
        self.u: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: A = None
        self.o: C = None
        self.w: J = None
        self.s: B = None
        self.t: C = None
        self.q: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: H = None
        self.txt = txt

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

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