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

class B:
    def __init__(self, txt: str):
        self.o: J = None
        self.r: D = None
        self.s: I = None
        self.z: E = None
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: I = None
        self.z: H = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: J = None
        self.v: F = None
        self.s: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: J = None
        self.t: B = None
        self.s: J = None
        self.z: J = None
        self.y: D = None
        self.q: D = None
        self.u: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.q: A = None
        self.v: A = None
        self.z: G = None
        self.t: F = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: J = None
        self.r: D = None
        self.s: I = None
        self.z: E = None
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: I = None
        self.z: H = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: J = None
        self.v: F = None
        self.s: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: J = None
        self.t: B = None
        self.s: J = None
        self.z: J = None
        self.y: D = None
        self.q: D = None
        self.u: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.q: A = None
        self.v: A = None
        self.z: G = None
        self.t: F = None
        self.txt = txt

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

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

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

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