class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.s: B = None
        self.p: H = None
        self.q: B = None
        self.z: I = None
        self.o: H = None
        self.r: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

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

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

k = A("k")
f = B("f")
e = C("e")
m = D("m")
i = E("i")
h = F("h")
d = G("d")
l = H("l")
c = I("c")

k.o = f
k.y = i
f.s = e
f.t = e
f.o = k
f.p = h
e.q = c
e.r = c
e.u = i
e.p = m
m.y = k
m.z = l
m.p = h
i.v = l
i.p = l
i.o = l
i.s = f
i.q = f
i.z = c
i.r = c
h.x = i
d.u = f
d.t = f
d.r = i
d.v = i
d.q = m
d.w = c
d.s = k
d.p = e
l.x = k
l.s = f
c.v = k
c.t = e
assert l.x.y.q.o.txt == "
class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.s: B = None
        self.p: H = None
        self.q: B = None
        self.z: I = None
        self.o: H = None
        self.r: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

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

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

k = A("k")
f = B("f")
e = C("e")
m = D("m")
i = E("i")
h = F("h")
d = G("d")
l = H("l")
c = I("c")

k.o = f
k.y = i
f.s = e
f.t = e
f.o = k
f.p = h
e.q = c
e.r = c
e.u = i
e.p = m
m.y = k
m.z = l
m.p = h
i.v = l
i.p = l
i.o = l
i.s = f
i.q = f
i.z = c
i.r = c
h.x = i
d.u = f
d.t = f
d.r = i
d.v = i
d.q = m
d.w = c
d.s = k
d.p = e
l.x = k
l.s = f
c.v = k
c.t = e
assert l.x.y.q.o.txt == "k"