class A:
    def __init__(self, txt: str):
        self.o: G = None
        self.w: E = None
        self.t: E = None
        self.u: H = None
        self.r: J = None
        self.p: B = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.u: J = None
        self.w: G = None
        self.t: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: E = None
        self.r: C = None
        self.p: F = None
        self.w: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: A = None
        self.v: J = None
        self.o: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: G = None
        self.v: D = None
        self.t: B = None
        self.w: I = None
        self.x: A = None
        self.o: I = None
        self.s: G = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.u: J = None
        self.w: G = None
        self.t: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: E = None
        self.r: C = None
        self.p: F = None
        self.w: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: A = None
        self.v: J = None
        self.o: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: G = None
        self.v: D = None
        self.t: B = None
        self.w: I = None
        self.x: A = None
        self.o: I = None
        self.s: G = None
        self.txt = txt

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

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