class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: D = None
        self.q: A = None
        self.u: D = None
        self.z: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.t: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: I = None
        self.y: H = None
        self.u: C = None
        self.o: C = None
        self.w: A = None
        self.q: B = None
        self.v: I = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.y: F = None
        self.w: F = None
        self.s: H = None
        self.t: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.t: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: I = None
        self.y: H = None
        self.u: C = None
        self.o: C = None
        self.w: A = None
        self.q: B = None
        self.v: I = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.y: F = None
        self.w: F = None
        self.s: H = None
        self.t: C = None
        self.txt = txt

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

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