class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: D = None
        self.u: E = None
        self.y: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: H = None
        self.s: G = None
        self.r: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: I = None
        self.r: J = None
        self.t: J = None
        self.z: F = None
        self.u: A = None
        self.v: J = None
        self.q: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.w: A = None
        self.s: F = None
        self.u: I = None
        self.o: B = None
        self.q: C = None
        self.z: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.p: H = None
        self.t: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.q: E = None
        self.p: I = None
        self.v: E = None
        self.z: E = None
        self.w: H = None
        self.y: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.y: A = None
        self.q: J = None
        self.z: A = None
        self.o: J = None
        self.t: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: H = None
        self.s: G = None
        self.r: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: I = None
        self.r: J = None
        self.t: J = None
        self.z: F = None
        self.u: A = None
        self.v: J = None
        self.q: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.w: A = None
        self.s: F = None
        self.u: I = None
        self.o: B = None
        self.q: C = None
        self.z: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.p: H = None
        self.t: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.q: E = None
        self.p: I = None
        self.v: E = None
        self.z: E = None
        self.w: H = None
        self.y: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.y: A = None
        self.q: J = None
        self.z: A = None
        self.o: J = None
        self.t: G = None
        self.txt = txt

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

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

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