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

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

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: A = None
        self.o: A = None
        self.s: F = None
        self.y: G = None
        self.v: I = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: A = None
        self.o: A = None
        self.s: F = None
        self.y: G = None
        self.v: I = None
        self.txt = txt

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

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

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

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

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

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