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

class B:
    def __init__(self, txt: str):
        self.o: J = None
        self.s: H = None
        self.y: C = None
        self.z: E = None
        self.p: I = None
        self.t: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: I = None
        self.w: G = None
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: G = None
        self.x: F = None
        self.z: I = None
        self.p: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: G = None
        self.v: D = None
        self.q: C = None
        self.o: H = None
        self.y: I = None
        self.z: D = None
        self.r: B = None
        self.t: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: J = None
        self.s: C = None
        self.w: D = None
        self.q: J = None
        self.u: F = None
        self.o: D = None
        self.r: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: G = None
        self.y: F = None
        self.txt = txt

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

k = A("k")
a = B("a")
l = C("l")
m = D("m")
h = E("h")
f = F("f")
b = G("b")
c = H("c")
e = I("e")
n = J("n")

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

class B:
    def __init__(self, txt: str):
        self.o: J = None
        self.s: H = None
        self.y: C = None
        self.z: E = None
        self.p: I = None
        self.t: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: I = None
        self.w: G = None
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: G = None
        self.x: F = None
        self.z: I = None
        self.p: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: G = None
        self.v: D = None
        self.q: C = None
        self.o: H = None
        self.y: I = None
        self.z: D = None
        self.r: B = None
        self.t: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: J = None
        self.s: C = None
        self.w: D = None
        self.q: J = None
        self.u: F = None
        self.o: D = None
        self.r: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: G = None
        self.y: F = None
        self.txt = txt

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

k = A("k")
a = B("a")
l = C("l")
m = D("m")
h = E("h")
f = F("f")
b = G("b")
c = H("c")
e = I("e")
n = J("n")

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