class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.p: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.s: F = None
        self.z: F = None
        self.v: H = None
        self.q: H = None
        self.x: F = None
        self.o: D = None
        self.u: H = None
        self.txt = txt

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

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.s: F = None
        self.z: F = None
        self.v: H = None
        self.q: H = None
        self.x: F = None
        self.o: D = None
        self.u: H = None
        self.txt = txt

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

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

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

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

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

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

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

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