class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: C = None
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.q: D = None
        self.s: A = None
        self.v: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: B = None
        self.t: I = None
        self.y: B = None
        self.q: I = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.q: D = None
        self.s: A = None
        self.v: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: B = None
        self.t: I = None
        self.y: B = None
        self.q: I = None
        self.txt = txt

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

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

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

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

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