class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: H = None
        self.r: B = None
        self.y: H = None
        self.u: D = None
        self.s: J = None
        self.x: I = None
        self.z: E = None
        self.t: I = None
        self.q: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: A = None
        self.p: J = None
        self.z: J = None
        self.u: B = None
        self.y: I = None
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.w: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: H = None
        self.o: J = None
        self.t: A = None
        self.w: A = None
        self.z: G = None
        self.y: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.u: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: A = None
        self.o: E = None
        self.s: F = None
        self.z: H = None
        self.x: B = None
        self.txt = txt

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

m = A("m")
b = B("b")
i = C("i")
e = D("e")
f = E("f")
l = F("l")
c = G("c")
h = H("h")
g = I("g")
a = J("a")

m.o = l
m.p = h
m.y = h
m.r = b
m.u = e
m.s = a
m.x = g
m.t = g
m.z = f
m.q = f
b.u = g
b.z = l
b.w = a
i.v = m
i.w = m
i.s = m
i.p = a
i.z = a
i.u = b
i.y = g
e.y = h
e.w = b
f.r = b
l.u = f
l.q = h
l.o = a
l.t = m
l.w = m
l.z = c
l.y = g
c.w = h
h.s = g
h.u = f
g.q = b
g.x = b
g.u = m
g.o = f
g.s = l
g.z = h
a.v = m
a.q = m
a.w = m
a.x = e
a.z = c
a.s = g
a.y = l
a.r = l
a.u = f
assert l.o.z.w.s.z.s.txt == "
class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: H = None
        self.r: B = None
        self.y: H = None
        self.u: D = None
        self.s: J = None
        self.x: I = None
        self.z: E = None
        self.t: I = None
        self.q: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: A = None
        self.p: J = None
        self.z: J = None
        self.u: B = None
        self.y: I = None
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.w: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: H = None
        self.o: J = None
        self.t: A = None
        self.w: A = None
        self.z: G = None
        self.y: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.u: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: A = None
        self.o: E = None
        self.s: F = None
        self.z: H = None
        self.x: B = None
        self.txt = txt

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

m = A("m")
b = B("b")
i = C("i")
e = D("e")
f = E("f")
l = F("l")
c = G("c")
h = H("h")
g = I("g")
a = J("a")

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