class A:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: E = None
        self.y: C = None
        self.p: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: E = None
        self.y: C = None
        self.p: C = None
        self.txt = txt

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

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