class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.u: F = None
        self.q: A = None
        self.w: F = None
        self.x: E = None
        self.y: D = None
        self.z: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.v: A = None
        self.u: G = None
        self.s: A = None
        self.o: E = None
        self.p: I = None
        self.t: D = None
        self.w: B = None
        self.x: B = 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.x: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: F = None
        self.y: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.u: F = None
        self.q: A = None
        self.w: F = None
        self.x: E = None
        self.y: D = None
        self.z: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.v: A = None
        self.u: G = None
        self.s: A = None
        self.o: E = None
        self.p: I = None
        self.t: D = None
        self.w: B = None
        self.x: B = 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.x: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: F = None
        self.y: F = None
        self.txt = txt

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

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