class A:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: D = None
        self.v: F = None
        self.r: C = None
        self.w: D = None
        self.p: J = None
        self.s: C = None
        self.u: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: C = None
        self.v: F = None
        self.s: H = None
        self.y: G = None
        self.w: C = None
        self.x: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: G = None
        self.s: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: C = None
        self.v: F = None
        self.s: H = None
        self.y: G = None
        self.w: C = None
        self.x: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: G = None
        self.s: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

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

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

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

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

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