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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: D = None
        self.t: D = None
        self.r: F = None
        self.txt = txt

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

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

e = A("e")
j = B("j")
f = C("f")
c = D("c")
a = E("a")
g = F("g")
n = G("n")
b = A("b")

e.z = a
e.v = a
e.u = b
e.o = j
j.w = a
j.z = g
j.o = c
j.x = e
f.v = j
c.q = n
c.u = j
a.y = j
a.o = c
a.t = c
a.r = g
g.z = c
g.q = c
g.x = n
g.y = n
g.p = n
g.t = b
n.v = j
n.q = j
n.s = g
n.y = f
n.x = f
n.p = e
n.z = c
b.z = a
b.v = a
b.u = e
b.o = j
assert a.y.w.r.x.p.v.txt == "
class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: A = None
        self.v: E = None
        self.o: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: D = None
        self.t: D = None
        self.r: F = None
        self.txt = txt

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

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

e = A("e")
j = B("j")
f = C("f")
c = D("c")
a = E("a")
g = F("g")
n = G("n")
b = A("b")

e.z = a
e.v = a
e.u = b
e.o = j
j.w = a
j.z = g
j.o = c
j.x = e
f.v = j
c.q = n
c.u = j
a.y = j
a.o = c
a.t = c
a.r = g
g.z = c
g.q = c
g.x = n
g.y = n
g.p = n
g.t = b
n.v = j
n.q = j
n.s = g
n.y = f
n.x = f
n.p = e
n.z = c
b.z = a
b.v = a
b.u = e
b.o = j
assert a.y.w.r.x.p.v.txt == "a"