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

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

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

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: H = None
        self.z: H = None
        self.s: D = None
        self.y: C = None
        self.x: A = None
        self.w: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.w: E = None
        self.u: B = None
        self.q: A = None
        self.o: A = None
        self.v: A = None
        self.p: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: D = None
        self.s: F = None
        self.z: F = None
        self.o: F = None
        self.y: E = None
        self.u: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: H = None
        self.z: H = None
        self.s: D = None
        self.y: C = None
        self.x: A = None
        self.w: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.w: E = None
        self.u: B = None
        self.q: A = None
        self.o: A = None
        self.v: A = None
        self.p: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: D = None
        self.s: F = None
        self.z: F = None
        self.o: F = None
        self.y: E = None
        self.u: B = None
        self.txt = txt

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

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