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

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.t: A = None
        self.r: A = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.t: A = None
        self.r: A = None
        self.txt = txt

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

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

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

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