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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: D = None
        self.w: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: E = None
        self.r: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: C = None
        self.x: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: D = None
        self.w: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: E = None
        self.r: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: C = None
        self.x: B = None
        self.txt = txt

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

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