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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: C = None
        self.w: A = None
        self.y: A = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: C = None
        self.w: A = None
        self.y: A = None
        self.txt = txt

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

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

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

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