class A:
    def __init__(self, txt: str):
        self.o: H = None
        self.x: B = None
        self.z: I = None
        self.s: F = None
        self.p: C = None
        self.v: E = None
        self.y: I = None
        self.w: E = None
        self.q: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: E = None
        self.z: A = None
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.o: I = None
        self.y: H = None
        self.t: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: I = None
        self.w: I = None
        self.u: H = None
        self.r: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: I = None
        self.o: C = None
        self.u: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.q: B = None
        self.o: I = None
        self.p: F = None
        self.w: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: E = None
        self.z: A = None
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.o: I = None
        self.y: H = None
        self.t: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: I = None
        self.w: I = None
        self.u: H = None
        self.r: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: I = None
        self.o: C = None
        self.u: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.q: B = None
        self.o: I = None
        self.p: F = None
        self.w: B = None
        self.txt = txt

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

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

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