class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: C = None
        self.p: C = None
        self.w: F = None
        self.o: B = None
        self.t: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: F = None
        self.o: C = None
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: F = None
        self.z: A = None
        self.s: F = None
        self.q: E = None
        self.o: D = None
        self.txt = txt

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

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

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

i = A("i")
n = B("n")
k = C("k")
d = D("d")
g = E("g")
f = F("f")

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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: F = None
        self.o: C = None
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: F = None
        self.z: A = None
        self.s: F = None
        self.q: E = None
        self.o: D = None
        self.txt = txt

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

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

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

i = A("i")
n = B("n")
k = C("k")
d = D("d")
g = E("g")
f = F("f")

i.x = f
i.w = f
i.y = k
i.p = k
i.o = n
i.t = n
n.x = d
n.p = f
n.y = f
n.o = k
k.p = n
k.x = f
k.s = f
k.z = i
k.q = g
k.o = d
d.r = n
d.y = n
d.v = f
d.z = f
d.w = k
d.x = i
g.w = k
g.r = k
g.s = k
g.q = i
g.x = d
g.t = d
f.y = n
f.t = n
assert g.r.q.q.w.t.txt == "n"