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

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

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

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

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

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

j.v = a
j.y = f
j.r = f
m.z = l
m.u = a
m.w = f
m.t = f
m.o = j
n.r = d
n.v = d
n.o = l
n.t = f
n.x = j
n.y = j
n.s = a
l.o = a
f.t = l
f.o = d
f.r = d
f.v = m
f.w = m
f.z = j
a.u = f
a.z = j
d.r = a
d.y = a
g.r = d
g.v = d
g.o = l
g.t = f
g.x = j
g.y = j
g.s = a
assert a.z.v.z.y.w.z.o.txt == "a"