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

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: B = None
        self.r: G = None
        self.u: I = None
        self.o: B = None
        self.y: A = None
        self.t: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: B = None
        self.r: A = None
        self.v: B = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: B = None
        self.r: G = None
        self.u: I = None
        self.o: B = None
        self.y: A = None
        self.t: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: B = None
        self.r: A = None
        self.v: B = None
        self.txt = txt

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

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

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

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