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

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: D = None
        self.q: C = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: B = None
        self.y: A = None
        self.u: G = None
        self.r: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: D = None
        self.q: C = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: B = None
        self.y: A = None
        self.u: G = None
        self.r: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

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

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