class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: E = None
        self.t: D = None
        self.w: C = None
        self.v: D = None
        self.y: F = None
        self.r: D = None
        self.u: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: I = None
        self.p: F = None
        self.r: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.u: A = None
        self.r: A = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: A = None
        self.o: A = None
        self.z: C = None
        self.v: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: I = None
        self.p: F = None
        self.r: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.u: A = None
        self.r: A = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: A = None
        self.o: A = None
        self.z: C = None
        self.v: B = None
        self.txt = txt

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

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