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

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

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

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

k = A("k")
b = B("b")
d = C("d")
a = D("a")
l = E("l")
j = F("j")
f = A("f")
c = D("c")

k.z = b
k.s = l
b.v = j
b.t = j
b.o = f
d.y = l
d.r = l
d.v = j
a.t = b
l.x = f
j.z = l
f.z = b
f.s = l
c.t = b
assert l.x.z.t.z.x.z.o.txt == "
class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

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

k = A("k")
b = B("b")
d = C("d")
a = D("a")
l = E("l")
j = F("j")
f = A("f")
c = D("c")

k.z = b
k.s = l
b.v = j
b.t = j
b.o = f
d.y = l
d.r = l
d.v = j
a.t = b
l.x = f
j.z = l
f.z = b
f.s = l
c.t = b
assert l.x.z.t.z.x.z.o.txt == "f"