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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: A = None
        self.u: E = None
        self.z: A = None
        self.p: A = None
        self.r: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: F = None
        self.u: B = None
        self.z: E = None
        self.p: D = None
        self.t: A = None
        self.s: A = None
        self.r: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: F = None
        self.s: D = None
        self.v: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: A = None
        self.u: E = None
        self.z: A = None
        self.p: A = None
        self.r: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: F = None
        self.u: B = None
        self.z: E = None
        self.p: D = None
        self.t: A = None
        self.s: A = None
        self.r: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: F = None
        self.s: D = None
        self.v: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: F = None
        self.txt = txt

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

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