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

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

class C:
    def __init__(self, txt: str):
        self.p: I = None
        self.r: I = None
        self.y: G = None
        self.w: E = None
        self.u: E = None
        self.q: D = None
        self.v: F = None
        self.z: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: I = None
        self.w: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.v: E = None
        self.y: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: C = None
        self.w: A = None
        self.s: C = None
        self.z: H = None
        self.y: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: I = None
        self.r: I = None
        self.y: G = None
        self.w: E = None
        self.u: E = None
        self.q: D = None
        self.v: F = None
        self.z: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: I = None
        self.w: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.v: E = None
        self.y: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: C = None
        self.w: A = None
        self.s: C = None
        self.z: H = None
        self.y: C = None
        self.txt = txt

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

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