class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.r: H = None
        self.y: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: F = None
        self.q: F = None
        self.t: C = None
        self.z: F = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: F = None
        self.q: F = None
        self.t: C = None
        self.z: F = None
        self.txt = txt

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

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

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

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

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