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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: D = None
        self.o: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: D = None
        self.v: F = None
        self.z: D = None
        self.txt = txt

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

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

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

i = A("i")
f = B("f")
h = C("h")
b = D("b")
a = E("a")
d = F("d")
g = F("g")
k = A("k")

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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: D = None
        self.o: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: D = None
        self.v: F = None
        self.z: D = None
        self.txt = txt

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

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

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

i = A("i")
f = B("f")
h = C("h")
b = D("b")
a = E("a")
d = F("d")
g = F("g")
k = A("k")

i.x = k
i.s = b
i.w = g
f.v = g
f.z = b
f.o = b
h.t = f
h.w = b
h.z = b
h.v = g
b.w = k
b.r = a
b.u = a
b.z = h
b.p = h
a.p = k
a.w = k
a.x = h
a.t = b
d.y = a
d.u = h
d.t = h
d.z = i
d.x = b
d.v = f
g.y = a
g.u = h
g.t = h
g.z = i
g.x = b
g.v = f
k.x = i
k.s = b
k.w = g
assert f.v.v.z.w.txt == "k"