class A:
    def __init__(self, txt: str):
        self.w: I = None
        self.q: B = None
        self.y: G = None
        self.r: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.v: G = None
        self.u: D = None
        self.y: I = None
        self.q: D = None
        self.x: F = None
        self.r: I = None
        self.o: E = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.v: G = None
        self.u: D = None
        self.y: I = None
        self.q: D = None
        self.x: F = None
        self.r: I = None
        self.o: E = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: D = None
        self.txt = txt

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

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