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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

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

f.w = d
f.y = d
f.u = l
f.p = l
f.s = n
f.x = n
d.r = f
d.t = m
d.v = i
d.q = i
d.p = l
d.o = b
d.z = e
e.t = i
e.u = b
e.o = l
i.p = n
l.x = b
l.w = b
l.p = b
l.y = m
l.t = d
l.z = d
b.v = l
m.u = e
m.r = l
n.u = e
n.r = l
assert d.p.z.q.p.txt == "
class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: E = None
        self.s: G = None
        self.p: E = None
        self.x: G = None
        self.y: B = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

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

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