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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: C = None
        self.y: C = None
        self.x: G = None
        self.u: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.o: C = None
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.y: C = None
        self.u: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.w: C = None
        self.v: A = None
        self.o: E = None
        self.t: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: C = None
        self.y: C = None
        self.x: G = None
        self.u: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.o: C = None
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.y: C = None
        self.u: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.w: C = None
        self.v: A = None
        self.o: E = None
        self.t: E = None
        self.txt = txt

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

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