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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: C = None
        self.q: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.z: H = None
        self.s: D = None
        self.u: B = None
        self.q: A = None
        self.x: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: E = None
        self.r: F = None
        self.p: B = None
        self.t: B = None
        self.y: D = None
        self.w: F = None
        self.txt = txt

e = A("e")
l = B("l")
c = C("c")
i = D("i")
a = E("a")
f = F("f")
n = G("n")
b = H("b")
k = B("k")

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: C = None
        self.q: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.z: H = None
        self.s: D = None
        self.u: B = None
        self.q: A = None
        self.x: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: E = None
        self.r: F = None
        self.p: B = None
        self.t: B = None
        self.y: D = None
        self.w: F = None
        self.txt = txt

e = A("e")
l = B("l")
c = C("c")
i = D("i")
a = E("a")
f = F("f")
n = G("n")
b = H("b")
k = B("k")

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