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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.p: F = None
        self.w: D = None
        self.q: D = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: F = None
        self.o: A = None
        self.q: E = None
        self.w: D = None
        self.z: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: E = None
        self.txt = txt

l = A("l")
i = B("i")
c = C("c")
k = D("k")
n = E("n")
h = F("h")
a = D("a")

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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.p: F = None
        self.w: D = None
        self.q: D = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: F = None
        self.o: A = None
        self.q: E = None
        self.w: D = None
        self.z: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: E = None
        self.txt = txt

l = A("l")
i = B("i")
c = C("c")
k = D("k")
n = E("n")
h = F("h")
a = D("a")

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