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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.s: G = None
        self.y: A = None
        self.v: A = None
        self.z: A = None
        self.t: G = None
        self.q: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: A = None
        self.z: F = None
        self.q: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.s: G = None
        self.y: A = None
        self.v: A = None
        self.z: A = None
        self.t: G = None
        self.q: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: A = None
        self.z: F = None
        self.q: C = None
        self.txt = txt

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

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