class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: D = None
        self.z: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.p: A = None
        self.z: A = None
        self.o: A = None
        self.w: B = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.p: A = None
        self.z: A = None
        self.o: A = None
        self.w: B = None
        self.txt = txt

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

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

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

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

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

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

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

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