class A:
    def __init__(self, txt: str):
        self.w: J = None
        self.q: I = None
        self.v: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: G = None
        self.x: F = None
        self.p: D = None
        self.txt = txt

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.q: H = None
        self.z: C = None
        self.r: D = None
        self.t: D = None
        self.s: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: G = None
        self.x: F = None
        self.p: D = None
        self.txt = txt

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.q: H = None
        self.z: C = None
        self.r: D = None
        self.t: D = None
        self.s: G = None
        self.txt = txt

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

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