class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: H = None
        self.t: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.y: D = None
        self.u: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: D = None
        self.w: C = None
        self.z: B = None
        self.q: C = None
        self.p: G = None
        self.txt = txt

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

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

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

g = A("g")
e = B("e")
f = C("f")
n = D("n")
k = E("k")
j = F("j")
l = G("l")
a = H("a")

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

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

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.y: D = None
        self.u: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: D = None
        self.w: C = None
        self.z: B = None
        self.q: C = None
        self.p: G = None
        self.txt = txt

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

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

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

g = A("g")
e = B("e")
f = C("f")
n = D("n")
k = E("k")
j = F("j")
l = G("l")
a = H("a")

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