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

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

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

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

j = A("j")
i = B("i")
a = C("a")
k = D("k")
n = E("n")
f = F("f")
b = C("b")
e = A("e")

j.t = e
j.o = e
j.z = a
j.s = i
i.r = k
i.s = n
a.v = i
a.x = e
a.r = n
k.s = f
n.s = f
n.v = j
n.t = k
f.s = k
f.t = k
b.v = i
b.x = e
b.r = n
e.t = j
e.o = j
e.z = a
e.s = i
assert f.s.s.s.txt == "
class A:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: A = None
        self.z: C = None
        self.s: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

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

j = A("j")
i = B("i")
a = C("a")
k = D("k")
n = E("n")
f = F("f")
b = C("b")
e = A("e")

j.t = e
j.o = e
j.z = a
j.s = i
i.r = k
i.s = n
a.v = i
a.x = e
a.r = n
k.s = f
n.s = f
n.v = j
n.t = k
f.s = k
f.t = k
b.v = i
b.x = e
b.r = n
e.t = j
e.o = j
e.z = a
e.s = i
assert f.s.s.s.txt == "k"