class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: H = None
        self.p: J = None
        self.y: F = None
        self.z: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.o: B = None
        self.r: E = None
        self.q: B = None
        self.s: A = None
        self.u: J = None
        self.y: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: I = None
        self.w: B = None
        self.z: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.r: J = None
        self.q: C = None
        self.z: C = None
        self.u: B = None
        self.v: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: I = None
        self.w: C = None
        self.v: G = None
        self.y: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: H = None
        self.q: H = None
        self.w: H = None
        self.s: E = None
        self.o: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: A = None
        self.q: H = None
        self.x: E = None
        self.p: H = None
        self.z: H = None
        self.t: D = None
        self.o: C = None
        self.txt = txt

d = A("d")
i = B("i")
j = C("j")
a = D("a")
k = E("k")
b = F("b")
g = G("g")
h = H("h")
e = I("e")
c = J("c")

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.o: B = None
        self.r: E = None
        self.q: B = None
        self.s: A = None
        self.u: J = None
        self.y: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: I = None
        self.w: B = None
        self.z: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.r: J = None
        self.q: C = None
        self.z: C = None
        self.u: B = None
        self.v: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: I = None
        self.w: C = None
        self.v: G = None
        self.y: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: H = None
        self.q: H = None
        self.w: H = None
        self.s: E = None
        self.o: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: A = None
        self.q: H = None
        self.x: E = None
        self.p: H = None
        self.z: H = None
        self.t: D = None
        self.o: C = None
        self.txt = txt

d = A("d")
i = B("i")
j = C("j")
a = D("a")
k = E("k")
b = F("b")
g = G("g")
h = H("h")
e = I("e")
c = J("c")

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