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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.v: D = None
        self.w: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.q: A = None
        self.w: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.u: C = None
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.u: J = None
        self.r: H = None
        self.x: C = None
        self.w: F = None
        self.t: F = None
        self.y: F = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.p: E = None
        self.q: G = None
        self.u: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.v: D = None
        self.w: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.q: A = None
        self.w: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.u: C = None
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.u: J = None
        self.r: H = None
        self.x: C = None
        self.w: F = None
        self.t: F = None
        self.y: F = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.p: E = None
        self.q: G = None
        self.u: D = None
        self.txt = txt

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

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

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