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

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

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.v: D = None
        self.q: G = None
        self.u: G = None
        self.z: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: A = None
        self.r: C = None
        self.q: C = None
        self.s: G = None
        self.y: D = None
        self.p: E = None
        self.txt = txt

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

i = A("i")
k = B("k")
n = C("n")
b = D("b")
h = E("h")
d = F("d")
e = G("e")
g = B("g")
m = F("m")
l = A("l")

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

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

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.v: D = None
        self.q: G = None
        self.u: G = None
        self.z: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: A = None
        self.r: C = None
        self.q: C = None
        self.s: G = None
        self.y: D = None
        self.p: E = None
        self.txt = txt

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

i = A("i")
k = B("k")
n = C("n")
b = D("b")
h = E("h")
d = F("d")
e = G("e")
g = B("g")
m = F("m")
l = A("l")

i.u = h
i.w = b
k.s = n
k.u = e
k.p = h
k.x = l
n.y = d
n.v = b
n.q = e
n.u = e
n.z = e
b.x = m
b.r = e
h.u = i
d.o = n
d.r = n
d.q = n
d.x = i
d.s = e
d.y = b
d.p = h
e.p = b
e.z = b
e.q = b
e.s = g
e.w = k
e.y = h
g.s = n
g.u = e
g.p = h
g.x = i
m.o = n
m.r = n
m.q = n
m.x = l
m.s = e
m.y = b
m.p = h
l.u = h
l.w = b
assert g.p.u.u.u.u.u.w.r.txt == "e"