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

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.w: H = None
        self.p: D = None
        self.o: G = None
        self.u: B = None
        self.y: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.w: H = None
        self.p: D = None
        self.o: G = None
        self.u: B = None
        self.y: C = None
        self.txt = txt

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

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