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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: G = None
        self.t: H = None
        self.y: B = None
        self.r: B = None
        self.u: G = None
        self.w: G = None
        self.z: A = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: E = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: G = None
        self.t: H = None
        self.y: B = None
        self.r: B = None
        self.u: G = None
        self.w: G = None
        self.z: A = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: E = None
        self.txt = txt

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

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