class A:
    def __init__(self, txt: str):
        self.o: J = None
        self.q: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: E = None
        self.v: A = None
        self.r: E = None
        self.y: D = None
        self.q: J = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: B = None
        self.z: A = None
        self.r: D = None
        self.q: B = None
        self.o: J = None
        self.v: A = None
        self.y: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: E = None
        self.r: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: J = None
        self.z: I = None
        self.p: A = None
        self.x: B = None
        self.y: J = None
        self.u: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: H = None
        self.p: F = None
        self.x: H = None
        self.z: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: E = None
        self.v: A = None
        self.r: E = None
        self.y: D = None
        self.q: J = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: B = None
        self.z: A = None
        self.r: D = None
        self.q: B = None
        self.o: J = None
        self.v: A = None
        self.y: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: E = None
        self.r: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: J = None
        self.z: I = None
        self.p: A = None
        self.x: B = None
        self.y: J = None
        self.u: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: H = None
        self.p: F = None
        self.x: H = None
        self.z: H = None
        self.txt = txt

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

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