class A:
    def __init__(self, txt: str):
        self.u: H = None
        self.o: I = None
        self.t: H = None
        self.x: I = None
        self.y: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: G = None
        self.p: A = None
        self.w: F = None
        self.q: I = None
        self.x: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.v: D = None
        self.w: I = None
        self.t: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: D = None
        self.w: E = None
        self.x: E = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: G = None
        self.p: A = None
        self.w: F = None
        self.q: I = None
        self.x: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.v: D = None
        self.w: I = None
        self.t: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: D = None
        self.w: E = None
        self.x: E = None
        self.txt = txt

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

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