class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: C = None
        self.t: F = None
        self.v: E = None
        self.r: B = None
        self.u: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: B = None
        self.t: F = None
        self.r: E = None
        self.txt = txt

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

f = A("f")
k = B("k")
a = C("a")
n = D("n")
i = E("i")
m = F("m")
d = E("d")
c = D("c")

f.y = d
f.v = d
f.p = a
f.t = m
f.r = k
f.u = k
k.x = i
k.z = c
k.v = f
a.r = n
a.v = c
a.y = c
a.s = i
a.p = d
n.s = a
n.x = c
n.z = i
i.z = a
i.p = k
i.t = m
i.r = d
m.w = c
d.z = a
d.p = k
d.t = m
d.r = i
c.s = a
c.x = n
c.z = i
assert d.p.x.t.w.s.r.txt == "
class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: C = None
        self.t: F = None
        self.v: E = None
        self.r: B = None
        self.u: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: B = None
        self.t: F = None
        self.r: E = None
        self.txt = txt

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

f = A("f")
k = B("k")
a = C("a")
n = D("n")
i = E("i")
m = F("m")
d = E("d")
c = D("c")

f.y = d
f.v = d
f.p = a
f.t = m
f.r = k
f.u = k
k.x = i
k.z = c
k.v = f
a.r = n
a.v = c
a.y = c
a.s = i
a.p = d
n.s = a
n.x = c
n.z = i
i.z = a
i.p = k
i.t = m
i.r = d
m.w = c
d.z = a
d.p = k
d.t = m
d.r = i
c.s = a
c.x = n
c.z = i
assert d.p.x.t.w.s.r.txt == "n"