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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.t: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: C = None
        self.z: A = None
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: D = None
        self.r: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: H = None
        self.z: E = None
        self.w: B = None
        self.txt = txt

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

k = A("k")
e = B("e")
g = C("g")
j = D("j")
c = E("c")
d = F("d")
f = G("f")
m = H("m")
n = E("n")

k.v = m
k.q = m
k.p = d
k.u = g
k.y = g
e.o = c
e.t = f
g.o = j
g.u = j
g.x = j
g.q = c
g.z = d
g.v = d
g.t = m
j.u = f
j.v = g
j.z = k
j.y = e
c.z = g
c.x = j
c.r = m
d.x = j
d.p = k
d.r = f
d.y = f
d.u = n
d.q = e
d.t = e
f.p = j
f.v = m
f.z = c
f.w = e
m.u = j
n.z = g
n.x = j
n.r = m
assert c.r.u.y.o.r.u.u.p.txt == "
class A:
    def __init__(self, txt: str):
        self.v: H = None
        self.q: H = None
        self.p: F = None
        self.u: C = None
        self.y: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.t: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: C = None
        self.z: A = None
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: D = None
        self.r: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: H = None
        self.z: E = None
        self.w: B = None
        self.txt = txt

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

k = A("k")
e = B("e")
g = C("g")
j = D("j")
c = E("c")
d = F("d")
f = G("f")
m = H("m")
n = E("n")

k.v = m
k.q = m
k.p = d
k.u = g
k.y = g
e.o = c
e.t = f
g.o = j
g.u = j
g.x = j
g.q = c
g.z = d
g.v = d
g.t = m
j.u = f
j.v = g
j.z = k
j.y = e
c.z = g
c.x = j
c.r = m
d.x = j
d.p = k
d.r = f
d.y = f
d.u = n
d.q = e
d.t = e
f.p = j
f.v = m
f.z = c
f.w = e
m.u = j
n.z = g
n.x = j
n.r = m
assert c.r.u.y.o.r.u.u.p.txt == "j"