class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: A = None
        self.r: B = None
        self.w: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: C = None
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: D = None
        self.w: F = None
        self.u: D = None
        self.y: F = None
        self.z: C = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: C = None
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: D = None
        self.w: F = None
        self.u: D = None
        self.y: F = None
        self.z: C = None
        self.txt = txt

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

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

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