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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: B = None
        self.z: F = None
        self.q: A = None
        self.txt = txt

m = A("m")
k = B("k")
e = C("e")
a = D("a")
j = E("j")
g = F("g")
n = F("n")
h = E("h")
f = F("f")

m.o = e
m.t = e
m.s = j
m.u = k
k.q = a
k.s = m
e.w = a
e.z = g
e.u = h
e.s = k
a.q = f
j.z = k
g.w = m
g.q = m
g.v = k
g.z = f
n.w = m
n.q = m
n.v = k
n.z = f
h.z = k
f.w = m
f.q = m
f.v = k
f.z = n
assert e.w.q.v.s.t.u.z.txt == "
class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.s: E = None
        self.u: B = None
        self.t: C = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: B = None
        self.z: F = None
        self.q: A = None
        self.txt = txt

m = A("m")
k = B("k")
e = C("e")
a = D("a")
j = E("j")
g = F("g")
n = F("n")
h = E("h")
f = F("f")

m.o = e
m.t = e
m.s = j
m.u = k
k.q = a
k.s = m
e.w = a
e.z = g
e.u = h
e.s = k
a.q = f
j.z = k
g.w = m
g.q = m
g.v = k
g.z = f
n.w = m
n.q = m
n.v = k
n.z = f
h.z = k
f.w = m
f.q = m
f.v = k
f.z = n
assert e.w.q.v.s.t.u.z.txt == "k"