class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: D = None
        self.z: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.s: D = None
        self.z: C = None
        self.o: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.x: H = None
        self.p: C = None
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.y: D = None
        self.v: H = None
        self.o: F = None
        self.p: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: C = None
        self.s: G = None
        self.u: F = None
        self.p: A = None
        self.o: C = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.s: D = None
        self.z: C = None
        self.o: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.x: H = None
        self.p: C = None
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.y: D = None
        self.v: H = None
        self.o: F = None
        self.p: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: C = None
        self.s: G = None
        self.u: F = None
        self.p: A = None
        self.o: C = None
        self.txt = txt

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

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

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