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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: C = None
        self.v: G = None
        self.y: I = None
        self.x: D = None
        self.p: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: I = None
        self.w: D = None
        self.z: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.o: H = None
        self.t: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: C = None
        self.v: G = None
        self.y: I = None
        self.x: D = None
        self.p: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: I = None
        self.w: D = None
        self.z: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.o: H = None
        self.t: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

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