class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: C = None
        self.y: B = None
        self.w: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: F = None
        self.u: B = None
        self.w: B = None
        self.q: C = None
        self.p: A = None
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: A = None
        self.x: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: D = None
        self.x: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: G = None
        self.p: D = None
        self.u: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: F = None
        self.u: B = None
        self.w: B = None
        self.q: C = None
        self.p: A = None
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: A = None
        self.x: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: D = None
        self.x: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: G = None
        self.p: D = None
        self.u: D = None
        self.txt = txt

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

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