class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: F = None
        self.u: B = None
        self.t: B = None
        self.x: E = None
        self.v: G = None
        self.z: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: B = None
        self.p: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: H = None
        self.o: H = None
        self.x: B = None
        self.y: I = None
        self.z: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: A = None
        self.y: E = None
        self.u: E = None
        self.t: C = None
        self.v: E = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: B = None
        self.p: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: H = None
        self.o: H = None
        self.x: B = None
        self.y: I = None
        self.z: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: A = None
        self.y: E = None
        self.u: E = None
        self.t: C = None
        self.v: E = None
        self.txt = txt

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

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

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