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

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: F = None
        self.o: D = None
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: A = None
        self.u: A = None
        self.t: C = None
        self.w: A = None
        self.s: G = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.v: C = None
        self.q: G = None
        self.p: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: F = None
        self.o: D = None
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: A = None
        self.u: A = None
        self.t: C = None
        self.w: A = None
        self.s: G = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.v: C = None
        self.q: G = None
        self.p: A = None
        self.txt = txt

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

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