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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: E = None
        self.o: D = None
        self.q: I = None
        self.y: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.y: G = None
        self.r: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: I = None
        self.z: C = None
        self.y: F = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: E = None
        self.o: D = None
        self.q: I = None
        self.y: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.y: G = None
        self.r: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: I = None
        self.z: C = None
        self.y: F = None
        self.txt = txt

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

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

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

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

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