class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: F = None
        self.z: E = None
        self.v: E = None
        self.w: E = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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