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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.y: B = None
        self.u: C = None
        self.z: I = None
        self.q: D = None
        self.v: F = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: H = None
        self.r: F = None
        self.y: G = None
        self.q: D = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.y: B = None
        self.u: C = None
        self.z: I = None
        self.q: D = None
        self.v: F = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: H = None
        self.r: F = None
        self.y: G = None
        self.q: D = None
        self.txt = txt

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

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

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