class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.s: J = None
        self.x: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.z: B = None
        self.u: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: B = None
        self.z: C = None
        self.y: A = None
        self.w: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.o: A = None
        self.w: G = None
        self.x: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.r: C = None
        self.u: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: I = None
        self.t: G = None
        self.u: F = None
        self.v: C = None
        self.x: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: E = None
        self.v: J = None
        self.s: J = None
        self.q: B = None
        self.o: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.z: B = None
        self.u: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: B = None
        self.z: C = None
        self.y: A = None
        self.w: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.o: A = None
        self.w: G = None
        self.x: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.r: C = None
        self.u: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: I = None
        self.t: G = None
        self.u: F = None
        self.v: C = None
        self.x: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: E = None
        self.v: J = None
        self.s: J = None
        self.q: B = None
        self.o: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

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

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