class A:
    def __init__(self, txt: str):
        self.o: H = None
        self.w: C = None
        self.x: I = None
        self.p: D = None
        self.z: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.y: B = None
        self.x: B = None
        self.u: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: I = None
        self.o: F = None
        self.t: I = None
        self.z: C = None
        self.w: B = None
        self.r: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: C = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.o: I = None
        self.q: A = None
        self.t: D = None
        self.r: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.x: F = None
        self.s: I = None
        self.r: F = None
        self.w: F = None
        self.u: A = None
        self.p: C = None
        self.o: I = None
        self.q: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: D = None
        self.x: D = None
        self.q: B = None
        self.u: G = None
        self.y: A = None
        self.w: G = None
        self.txt = txt

i = A("i")
h = B("h")
n = C("n")
f = D("f")
l = E("l")
j = F("j")
c = G("c")
m = H("m")
e = I("e")

i.o = m
i.w = n
i.z = n
i.x = e
i.p = f
h.o = j
h.x = j
h.v = i
h.p = n
n.w = e
n.y = h
n.x = h
n.u = m
f.r = l
f.s = h
f.p = h
f.v = h
f.w = c
f.z = m
f.u = m
l.x = e
l.t = e
l.o = j
l.z = n
l.w = h
l.r = m
j.x = n
j.w = n
j.o = n
c.x = m
c.o = e
c.q = i
c.r = i
c.t = f
m.y = c
m.x = j
m.r = j
m.w = j
m.s = e
m.o = e
m.q = e
m.u = i
m.p = n
e.s = n
e.z = f
e.x = f
e.q = h
e.u = c
e.w = c
e.y = i
assert c.o.z.r.w.p.u.txt == "
class A:
    def __init__(self, txt: str):
        self.o: H = None
        self.w: C = None
        self.x: I = None
        self.p: D = None
        self.z: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.y: B = None
        self.x: B = None
        self.u: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: I = None
        self.o: F = None
        self.t: I = None
        self.z: C = None
        self.w: B = None
        self.r: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: C = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.o: I = None
        self.q: A = None
        self.t: D = None
        self.r: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.x: F = None
        self.s: I = None
        self.r: F = None
        self.w: F = None
        self.u: A = None
        self.p: C = None
        self.o: I = None
        self.q: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: D = None
        self.x: D = None
        self.q: B = None
        self.u: G = None
        self.y: A = None
        self.w: G = None
        self.txt = txt

i = A("i")
h = B("h")
n = C("n")
f = D("f")
l = E("l")
j = F("j")
c = G("c")
m = H("m")
e = I("e")

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