class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.r: F = None
        self.w: G = None
        self.s: F = None
        self.t: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: H = None
        self.s: I = None
        self.y: D = None
        self.p: A = None
        self.u: E = None
        self.r: F = None
        self.z: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: H = None
        self.z: F = None
        self.y: A = None
        self.u: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.s: G = None
        self.t: D = None
        self.r: D = None
        self.q: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.y: J = None
        self.q: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.w: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.t: F = None
        self.p: F = None
        self.q: B = None
        self.y: F = None
        self.u: A = None
        self.w: H = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: H = None
        self.s: I = None
        self.y: D = None
        self.p: A = None
        self.u: E = None
        self.r: F = None
        self.z: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: H = None
        self.z: F = None
        self.y: A = None
        self.u: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.s: G = None
        self.t: D = None
        self.r: D = None
        self.q: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.y: J = None
        self.q: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.w: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.t: F = None
        self.p: F = None
        self.q: B = None
        self.y: F = None
        self.u: A = None
        self.w: H = None
        self.txt = txt

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

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

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