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

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

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

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

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

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

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

d = A("d")
l = B("l")
e = C("e")
g = D("g")
h = E("h")
j = F("j")
i = G("i")

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

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

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

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

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

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

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

d = A("d")
l = B("l")
e = C("e")
g = D("g")
h = E("h")
j = F("j")
i = G("i")

d.v = g
d.p = g
l.p = h
l.u = e
l.w = e
l.o = j
l.y = j
e.v = i
e.w = g
e.p = g
e.q = d
e.y = d
e.s = h
g.y = l
g.q = e
g.t = j
h.r = e
h.t = l
h.s = g
h.o = d
j.z = h
j.t = h
j.p = l
j.q = d
j.r = g
j.x = g
j.y = i
i.o = d
i.q = d
i.z = l
i.w = e
i.y = e
assert i.z.u.q.p.q.txt == "e"