class A:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.q: I = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.o: C = None
        self.w: D = None
        self.x: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: I = None
        self.q: F = None
        self.r: C = None
        self.z: F = None
        self.s: E = None
        self.o: I = None
        self.u: E = None
        self.y: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: C = None
        self.r: E = None
        self.x: H = None
        self.t: I = None
        self.s: F = None
        self.p: A = None
        self.v: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.q: I = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.o: C = None
        self.w: D = None
        self.x: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: I = None
        self.q: F = None
        self.r: C = None
        self.z: F = None
        self.s: E = None
        self.o: I = None
        self.u: E = None
        self.y: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: C = None
        self.r: E = None
        self.x: H = None
        self.t: I = None
        self.s: F = None
        self.p: A = None
        self.v: D = None
        self.txt = txt

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

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