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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: A = None
        self.z: G = None
        self.x: A = None
        self.txt = txt

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

g = A("g")
k = B("k")
f = C("f")
l = D("l")
e = E("e")
c = F("c")
d = G("d")

g.p = f
g.r = c
g.z = c
g.y = d
g.q = d
k.v = e
k.w = c
k.t = f
k.q = l
k.o = l
k.r = l
k.x = d
f.w = e
f.z = e
f.y = c
f.s = l
f.o = l
l.q = k
l.r = k
l.w = c
e.x = l
e.r = d
e.t = d
e.s = k
e.o = g
e.q = c
c.u = d
c.z = d
c.s = g
c.x = g
d.q = g
d.z = g
d.r = l
d.v = l
d.t = f
assert g.p.s.q.v.txt == "
class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.r: F = None
        self.y: G = None
        self.q: G = None
        self.z: F = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: A = None
        self.z: G = None
        self.x: A = None
        self.txt = txt

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

g = A("g")
k = B("k")
f = C("f")
l = D("l")
e = E("e")
c = F("c")
d = G("d")

g.p = f
g.r = c
g.z = c
g.y = d
g.q = d
k.v = e
k.w = c
k.t = f
k.q = l
k.o = l
k.r = l
k.x = d
f.w = e
f.z = e
f.y = c
f.s = l
f.o = l
l.q = k
l.r = k
l.w = c
e.x = l
e.r = d
e.t = d
e.s = k
e.o = g
e.q = c
c.u = d
c.z = d
c.s = g
c.x = g
d.q = g
d.z = g
d.r = l
d.v = l
d.t = f
assert g.p.s.q.v.txt == "e"