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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

k.x = n
k.t = e
k.q = e
k.v = m
b.x = m
b.v = j
b.y = k
m.o = k
j.o = i
i.p = n
i.z = n
i.o = m
i.s = c
e.y = h
h.x = c
h.v = j
h.y = k
n.p = i
n.z = i
n.o = m
n.s = c
c.o = k
assert e.y.v.o.z.s.o.txt == "
class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: F = None
        self.v: C = None
        self.q: F = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

k.x = n
k.t = e
k.q = e
k.v = m
b.x = m
b.v = j
b.y = k
m.o = k
j.o = i
i.p = n
i.z = n
i.o = m
i.s = c
e.y = h
h.x = c
h.v = j
h.y = k
n.p = i
n.z = i
n.o = m
n.s = c
c.o = k
assert e.y.v.o.z.s.o.txt == "k"