class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.p: I = None
        self.w: H = None
        self.q: J = None
        self.s: B = None
        self.u: B = None
        self.r: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: I = None
        self.q: E = None
        self.t: H = None
        self.o: D = None
        self.z: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: G = None
        self.s: B = None
        self.r: B = None
        self.w: A = None
        self.p: J = None
        self.z: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: B = None
        self.o: I = None
        self.x: I = None
        self.w: D = None
        self.p: C = None
        self.y: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.r: C = None
        self.q: A = None
        self.t: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: D = None
        self.z: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: I = None
        self.q: E = None
        self.t: H = None
        self.o: D = None
        self.z: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: G = None
        self.s: B = None
        self.r: B = None
        self.w: A = None
        self.p: J = None
        self.z: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: B = None
        self.o: I = None
        self.x: I = None
        self.w: D = None
        self.p: C = None
        self.y: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.r: C = None
        self.q: A = None
        self.t: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: D = None
        self.z: C = None
        self.txt = txt

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

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