class A:
    def __init__(self, txt: str):
        self.p: H = None
        self.t: H = None
        self.r: F = None
        self.w: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: G = None
        self.v: B = None
        self.z: D = None
        self.r: E = None
        self.q: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.p: D = None
        self.q: H = None
        self.r: B = None
        self.y: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.o: D = None
        self.x: H = None
        self.q: H = None
        self.t: D = None
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.s: H = None
        self.y: A = None
        self.u: A = None
        self.w: A = None
        self.v: E = None
        self.p: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: G = None
        self.v: B = None
        self.y: H = None
        self.r: G = None
        self.t: C = None
        self.q: E = None
        self.p: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: G = None
        self.s: B = None
        self.r: G = None
        self.o: D = None
        self.y: D = None
        self.w: C = None
        self.t: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: G = None
        self.v: B = None
        self.z: D = None
        self.r: E = None
        self.q: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.p: D = None
        self.q: H = None
        self.r: B = None
        self.y: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.o: D = None
        self.x: H = None
        self.q: H = None
        self.t: D = None
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.s: H = None
        self.y: A = None
        self.u: A = None
        self.w: A = None
        self.v: E = None
        self.p: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: G = None
        self.v: B = None
        self.y: H = None
        self.r: G = None
        self.t: C = None
        self.q: E = None
        self.p: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: G = None
        self.s: B = None
        self.r: G = None
        self.o: D = None
        self.y: D = None
        self.w: C = None
        self.t: F = None
        self.txt = txt

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

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