class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: D = None
        self.q: C = None
        self.s: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: B = None
        self.x: G = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: G = None
        self.y: G = None
        self.p: D = None
        self.v: D = None
        self.x: A = None
        self.z: G = None
        self.txt = txt

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

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

n = A("n")
m = B("m")
k = C("k")
d = D("d")
j = E("j")
g = F("g")
l = G("l")

n.w = k
n.q = k
n.s = k
n.o = d
m.s = k
k.z = j
k.y = d
d.p = g
d.v = g
d.o = m
d.x = l
j.s = k
j.r = l
j.y = l
j.z = l
j.p = d
j.v = d
j.x = n
g.r = l
g.v = l
g.w = m
g.o = d
l.y = k
l.q = k
l.u = n
l.o = n
assert g.w.s.z.y.txt == "
class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: D = None
        self.q: C = None
        self.s: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: B = None
        self.x: G = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: G = None
        self.y: G = None
        self.p: D = None
        self.v: D = None
        self.x: A = None
        self.z: G = None
        self.txt = txt

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

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

n = A("n")
m = B("m")
k = C("k")
d = D("d")
j = E("j")
g = F("g")
l = G("l")

n.w = k
n.q = k
n.s = k
n.o = d
m.s = k
k.z = j
k.y = d
d.p = g
d.v = g
d.o = m
d.x = l
j.s = k
j.r = l
j.y = l
j.z = l
j.p = d
j.v = d
j.x = n
g.r = l
g.v = l
g.w = m
g.o = d
l.y = k
l.q = k
l.u = n
l.o = n
assert g.w.s.z.y.txt == "l"