class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.s: F = None
        self.x: B = None
        self.y: G = None
        self.u: D = None
        self.o: H = None
        self.q: H = None
        self.v: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: I = None
        self.t: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: I = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: I = None
        self.t: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: I = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: A = None
        self.txt = txt

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

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