class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.o: G = None
        self.u: G = None
        self.s: G = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.o: G = None
        self.u: G = None
        self.s: G = None
        self.txt = txt

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

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

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

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

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