class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: B = None
        self.y: F = None
        self.o: E = None
        self.r: H = None
        self.t: H = None
        self.z: G = None
        self.w: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: B = None
        self.z: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: J = None
        self.s: G = None
        self.t: C = None
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: I = None
        self.q: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.v: G = None
        self.p: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: B = None
        self.z: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: J = None
        self.s: G = None
        self.t: C = None
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: I = None
        self.q: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.v: G = None
        self.p: A = None
        self.txt = txt

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

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