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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: D = None
        self.s: D = None
        self.p: C = None
        self.z: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: B = None
        self.r: E = None
        self.z: A = None
        self.t: D = None
        self.txt = txt

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

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

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

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

c.s = a
k.v = c
k.t = g
k.s = g
k.p = e
k.z = a
h.w = k
h.q = k
h.r = a
h.z = c
h.t = g
g.t = c
g.z = k
a.o = c
n.w = k
n.q = k
n.p = k
n.u = k
n.y = g
n.z = e
e.w = k
e.q = k
e.r = a
e.z = c
e.t = g
assert e.w.z.o.txt == "
class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: D = None
        self.s: D = None
        self.p: C = None
        self.z: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: B = None
        self.r: E = None
        self.z: A = None
        self.t: D = None
        self.txt = txt

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

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

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

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

c.s = a
k.v = c
k.t = g
k.s = g
k.p = e
k.z = a
h.w = k
h.q = k
h.r = a
h.z = c
h.t = g
g.t = c
g.z = k
a.o = c
n.w = k
n.q = k
n.p = k
n.u = k
n.y = g
n.z = e
e.w = k
e.q = k
e.r = a
e.z = c
e.t = g
assert e.w.z.o.txt == "c"