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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: C = None
        self.o: G = None
        self.t: G = None
        self.s: C = None
        self.w: B = None
        self.p: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: F = None
        self.x: A = None
        self.u: C = None
        self.q: D = None
        self.txt = txt

i = A("i")
e = B("e")
b = C("b")
a = D("a")
k = E("k")
f = F("f")
n = G("n")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: C = None
        self.o: G = None
        self.t: G = None
        self.s: C = None
        self.w: B = None
        self.p: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: F = None
        self.x: A = None
        self.u: C = None
        self.q: D = None
        self.txt = txt

i = A("i")
e = B("e")
b = C("b")
a = D("a")
k = E("k")
f = F("f")
n = G("n")

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