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

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: F = None
        self.r: G = None
        self.u: H = None
        self.t: E = None
        self.z: E = None
        self.p: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: B = None
        self.w: F = None
        self.o: F = None
        self.x: G = None
        self.s: G = None
        self.q: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: F = None
        self.txt = txt

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

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

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

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

h = A("h")
n = B("n")
f = C("f")
i = D("i")
c = E("c")
m = F("m")
g = G("g")
k = H("k")

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

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: F = None
        self.r: G = None
        self.u: H = None
        self.t: E = None
        self.z: E = None
        self.p: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: B = None
        self.w: F = None
        self.o: F = None
        self.x: G = None
        self.s: G = None
        self.q: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: F = None
        self.txt = txt

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

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

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

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

h = A("h")
n = B("n")
f = C("f")
i = D("i")
c = E("c")
m = F("m")
g = G("g")
k = H("k")

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