class A:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.y: C = None
        self.u: A = None
        self.o: A = None
        self.r: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: J = None
        self.s: B = None
        self.r: H = None
        self.v: C = None
        self.y: F = None
        self.z: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.w: C = None
        self.p: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: I = None
        self.w: E = None
        self.o: J = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: E = None
        self.y: A = None
        self.q: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: C = None
        self.x: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.y: C = None
        self.u: A = None
        self.o: A = None
        self.r: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: J = None
        self.s: B = None
        self.r: H = None
        self.v: C = None
        self.y: F = None
        self.z: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.w: C = None
        self.p: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: I = None
        self.w: E = None
        self.o: J = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: E = None
        self.y: A = None
        self.q: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: C = None
        self.x: E = None
        self.txt = txt

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

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