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

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: G = None
        self.r: E = None
        self.q: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: E = None
        self.z: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: H = None
        self.r: B = None
        self.x: H = None
        self.s: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.s: I = None
        self.t: J = None
        self.r: G = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: I = None
        self.q: D = None
        self.p: G = None
        self.x: E = None
        self.w: B = None
        self.z: J = None
        self.v: E = None
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.t: I = None
        self.v: E = None
        self.z: H = None
        self.u: I = None
        self.w: E = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: E = None
        self.t: H = None
        self.s: F = None
        self.u: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: G = None
        self.r: E = None
        self.q: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: E = None
        self.z: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: H = None
        self.r: B = None
        self.x: H = None
        self.s: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.s: I = None
        self.t: J = None
        self.r: G = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: I = None
        self.q: D = None
        self.p: G = None
        self.x: E = None
        self.w: B = None
        self.z: J = None
        self.v: E = None
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.t: I = None
        self.v: E = None
        self.z: H = None
        self.u: I = None
        self.w: E = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: E = None
        self.t: H = None
        self.s: F = None
        self.u: C = None
        self.txt = txt

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

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