class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: I = None
        self.z: I = None
        self.q: F = None
        self.t: I = None
        self.x: E = None
        self.u: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.s: E = None
        self.x: G = None
        self.z: D = None
        self.t: H = None
        self.w: H = None
        self.r: F = None
        self.o: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: A = None
        self.x: D = None
        self.o: D = None
        self.v: A = None
        self.y: C = None
        self.z: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.v: C = None
        self.q: F = None
        self.x: H = None
        self.t: B = None
        self.z: A = None
        self.w: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.s: E = None
        self.x: G = None
        self.z: D = None
        self.t: H = None
        self.w: H = None
        self.r: F = None
        self.o: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: A = None
        self.x: D = None
        self.o: D = None
        self.v: A = None
        self.y: C = None
        self.z: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.v: C = None
        self.q: F = None
        self.x: H = None
        self.t: B = None
        self.z: A = None
        self.w: B = None
        self.txt = txt

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

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