class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: E = None
        self.r: E = None
        self.q: D = None
        self.p: D = None
        self.v: C = None
        self.s: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: G = None
        self.r: A = None
        self.z: H = None
        self.v: D = None
        self.t: G = None
        self.u: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.v: H = None
        self.p: C = None
        self.r: D = None
        self.q: H = None
        self.s: H = None
        self.o: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: H = None
        self.u: G = None
        self.txt = txt

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

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

i = A("i")
c = B("c")
k = C("k")
l = D("l")
j = E("j")
f = F("f")
b = G("b")
a = H("a")
m = G("m")
h = D("h")

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

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: E = None
        self.r: E = None
        self.q: D = None
        self.p: D = None
        self.v: C = None
        self.s: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: G = None
        self.r: A = None
        self.z: H = None
        self.v: D = None
        self.t: G = None
        self.u: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.v: H = None
        self.p: C = None
        self.r: D = None
        self.q: H = None
        self.s: H = None
        self.o: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: H = None
        self.u: G = None
        self.txt = txt

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

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

i = A("i")
c = B("c")
k = C("k")
l = D("l")
j = E("j")
f = F("f")
b = G("b")
a = H("a")
m = G("m")
h = D("h")

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