class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.t: E = None
        self.v: E = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: F = None
        self.t: B = None
        self.r: C = None
        self.y: F = None
        self.v: C = None
        self.txt = txt

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

a.r = n
a.t = b
a.v = b
l.x = b
e.z = k
e.r = k
f.u = a
f.o = k
f.y = d
k.r = e
k.z = e
k.v = l
k.u = l
k.s = l
k.x = d
n.o = k
n.u = d
n.y = d
n.t = l
n.r = e
n.v = e
m.z = k
m.r = k
d.o = k
d.u = n
d.y = n
d.t = l
d.r = e
d.v = e
b.r = m
b.z = e
b.v = l
b.u = l
b.s = l
b.x = n
assert k.x.o.z.z.r.r.txt == "
class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.t: E = None
        self.v: E = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: F = None
        self.t: B = None
        self.r: C = None
        self.y: F = None
        self.v: C = None
        self.txt = txt

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

a.r = n
a.t = b
a.v = b
l.x = b
e.z = k
e.r = k
f.u = a
f.o = k
f.y = d
k.r = e
k.z = e
k.v = l
k.u = l
k.s = l
k.x = d
n.o = k
n.u = d
n.y = d
n.t = l
n.r = e
n.v = e
m.z = k
m.r = k
d.o = k
d.u = n
d.y = n
d.t = l
d.r = e
d.v = e
b.r = m
b.z = e
b.v = l
b.u = l
b.s = l
b.x = n
assert k.x.o.z.z.r.r.txt == "k"