class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.p: G = None
        self.s: I = None
        self.w: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.v: A = None
        self.r: I = None
        self.w: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.r: D = None
        self.v: C = None
        self.q: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.s: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: C = None
        self.o: I = None
        self.x: F = None
        self.t: I = None
        self.z: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.s: D = None
        self.o: A = None
        self.r: B = None
        self.q: A = None
        self.y: B = None
        self.x: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.v: A = None
        self.r: I = None
        self.w: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.r: D = None
        self.v: C = None
        self.q: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.s: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: C = None
        self.o: I = None
        self.x: F = None
        self.t: I = None
        self.z: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.s: D = None
        self.o: A = None
        self.r: B = None
        self.q: A = None
        self.y: B = None
        self.x: B = None
        self.txt = txt

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

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