class A:
    def __init__(self, txt: str):
        self.r: I = None
        self.x: C = None
        self.y: E = None
        self.q: H = None
        self.w: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.v: A = None
        self.z: H = None
        self.w: C = None
        self.q: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: B = None
        self.x: C = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.v: A = None
        self.z: H = None
        self.w: C = None
        self.q: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: B = None
        self.x: C = None
        self.txt = txt

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

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

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

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

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