class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: D = None
        self.t: F = None
        self.r: F = None
        self.p: F = None
        self.z: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: E = None
        self.x: D = None
        self.txt = txt

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

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

d = A("d")
k = B("k")
n = C("n")
a = D("a")
l = E("l")
j = F("j")
f = D("f")

d.y = k
d.z = k
d.s = f
d.t = j
d.r = j
d.p = j
k.v = l
k.o = d
n.y = k
a.p = l
a.t = l
a.x = f
l.w = j
l.o = a
l.t = n
j.y = n
j.u = k
f.p = l
f.t = l
f.x = a
assert f.p.w.y.y.v.t.txt == "
class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: D = None
        self.t: F = None
        self.r: F = None
        self.p: F = None
        self.z: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: E = None
        self.x: D = None
        self.txt = txt

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

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

d = A("d")
k = B("k")
n = C("n")
a = D("a")
l = E("l")
j = F("j")
f = D("f")

d.y = k
d.z = k
d.s = f
d.t = j
d.r = j
d.p = j
k.v = l
k.o = d
n.y = k
a.p = l
a.t = l
a.x = f
l.w = j
l.o = a
l.t = n
j.y = n
j.u = k
f.p = l
f.t = l
f.x = a
assert f.p.w.y.y.v.t.txt == "n"