class A:
    def __init__(self, txt: str):
        self.w: H = None
        self.q: D = None
        self.x: F = None
        self.o: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: G = None
        self.x: E = None
        self.t: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: E = None
        self.q: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: G = None
        self.t: J = None
        self.s: C = None
        self.u: J = None
        self.x: B = None
        self.v: J = None
        self.r: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.w: H = None
        self.u: H = None
        self.x: A = None
        self.t: A = None
        self.y: C = None
        self.v: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: G = None
        self.x: E = None
        self.t: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: E = None
        self.q: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: G = None
        self.t: J = None
        self.s: C = None
        self.u: J = None
        self.x: B = None
        self.v: J = None
        self.r: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.w: H = None
        self.u: H = None
        self.x: A = None
        self.t: A = None
        self.y: C = None
        self.v: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

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