class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: B = None
        self.u: B = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: B = None
        self.u: B = None
        self.txt = txt

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

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

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

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

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

d.y = f
d.s = i
a.q = m
a.x = d
a.w = n
a.s = g
l.z = n
l.v = a
l.u = a
c.u = a
c.w = a
c.t = a
c.s = g
c.x = d
c.z = d
c.p = f
f.s = c
f.p = m
f.w = e
m.u = d
m.v = g
m.p = e
m.q = i
m.s = i
m.y = i
n.t = e
n.u = a
n.q = i
i.u = d
i.v = c
i.p = l
i.q = m
i.s = m
i.y = m
e.z = n
e.v = a
e.u = a
g.u = a
g.w = a
g.t = a
g.s = c
g.x = d
g.z = d
g.p = f
assert a.x.s.v.txt == "c"