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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: F = None
        self.y: G = None
        self.s: B = None
        self.u: B = None
        self.r: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.t: B = None
        self.w: E = None
        self.x: G = None
        self.v: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: G = None
        self.r: C = None
        self.z: D = None
        self.s: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: F = None
        self.y: G = None
        self.s: B = None
        self.u: B = None
        self.r: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.t: B = None
        self.w: E = None
        self.x: G = None
        self.v: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: G = None
        self.r: C = None
        self.z: D = None
        self.s: D = None
        self.txt = txt

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

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