class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.y: G = None
        self.p: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: J = None
        self.u: E = None
        self.z: I = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.y: G = None
        self.p: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: J = None
        self.u: E = None
        self.z: I = None
        self.txt = txt

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

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

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

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