class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: F = None
        self.v: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: H = None
        self.w: A = None
        self.r: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.v: B = None
        self.t: A = None
        self.p: E = None
        self.q: G = None
        self.s: H = None
        self.txt = txt

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

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

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

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

l = A("l")
i = B("i")
m = C("m")
h = D("h")
d = E("d")
a = F("a")
j = G("j")
g = H("g")
e = C("e")
c = F("c")

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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: H = None
        self.w: A = None
        self.r: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.v: B = None
        self.t: A = None
        self.p: E = None
        self.q: G = None
        self.s: H = None
        self.txt = txt

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

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

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

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

l = A("l")
i = B("i")
m = C("m")
h = D("h")
d = E("d")
a = F("a")
j = G("j")
g = H("g")
e = C("e")
c = F("c")

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