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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.u: B = None
        self.v: E = None
        self.s: F = None
        self.y: G = None
        self.q: H = None
        self.z: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: H = None
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.z: G = None
        self.p: A = None
        self.o: C = None
        self.y: C = None
        self.v: B = None
        self.q: B = None
        self.x: B = None
        self.s: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: A = None
        self.q: H = None
        self.t: I = None
        self.x: A = None
        self.r: F = None
        self.o: I = None
        self.s: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: H = None
        self.t: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.u: B = None
        self.v: E = None
        self.s: F = None
        self.y: G = None
        self.q: H = None
        self.z: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: H = None
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.z: G = None
        self.p: A = None
        self.o: C = None
        self.y: C = None
        self.v: B = None
        self.q: B = None
        self.x: B = None
        self.s: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: A = None
        self.q: H = None
        self.t: I = None
        self.x: A = None
        self.r: F = None
        self.o: I = None
        self.s: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: H = None
        self.t: A = None
        self.txt = txt

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

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