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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.q: E = None
        self.x: C = None
        self.u: E = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.q: E = None
        self.x: C = None
        self.u: E = None
        self.txt = txt

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

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

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

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

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

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