class A:
    def __init__(self, txt: str):
        self.u: G = None
        self.x: E = None
        self.p: F = None
        self.q: C = None
        self.v: E = None
        self.s: E = None
        self.t: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: E = None
        self.q: D = None
        self.o: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: E = None
        self.q: D = None
        self.o: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

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

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

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