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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: G = None
        self.u: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: I = None
        self.z: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: C = None
        self.w: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: F = None
        self.txt = txt

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

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

j.x = e
j.w = i
i.v = b
i.w = c
i.u = c
a.r = l
a.z = e
e.s = c
e.u = a
e.p = a
e.v = l
e.w = l
e.t = l
e.x = l
e.q = b
e.o = i
f.v = j
f.o = m
f.z = l
b.v = c
b.w = c
b.r = a
c.z = l
c.x = i
c.p = i
n.s = i
n.o = b
l.v = e
l.s = e
l.w = e
l.p = n
l.z = i
l.x = i
l.o = j
l.q = a
l.r = a
m.s = c
m.u = a
m.p = a
m.v = l
m.w = l
m.t = l
m.x = l
m.q = b
m.o = i
assert j.x.q.r.z.v.z.u.x.w.z.txt == "
class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: G = None
        self.u: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: I = None
        self.z: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: C = None
        self.w: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: F = None
        self.txt = txt

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

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

j.x = e
j.w = i
i.v = b
i.w = c
i.u = c
a.r = l
a.z = e
e.s = c
e.u = a
e.p = a
e.v = l
e.w = l
e.t = l
e.x = l
e.q = b
e.o = i
f.v = j
f.o = m
f.z = l
b.v = c
b.w = c
b.r = a
c.z = l
c.x = i
c.p = i
n.s = i
n.o = b
l.v = e
l.s = e
l.w = e
l.p = n
l.z = i
l.x = i
l.o = j
l.q = a
l.r = a
m.s = c
m.u = a
m.p = a
m.v = l
m.w = l
m.t = l
m.x = l
m.q = b
m.o = i
assert j.x.q.r.z.v.z.u.x.w.z.txt == "l"