class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.u: C = None
        self.q: C = None
        self.s: B = None
        self.x: E = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

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

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

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

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