class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.p: H = None
        self.o: D = None
        self.t: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.y: E = None
        self.v: F = None
        self.r: C = None
        self.t: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: F = None
        self.q: F = None
        self.y: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.x: E = None
        self.p: J = None
        self.t: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: F = None
        self.o: H = None
        self.x: E = None
        self.u: F = None
        self.p: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: D = None
        self.r: E = None
        self.w: D = None
        self.y: E = None
        self.u: H = None
        self.t: C = None
        self.z: E = None
        self.v: A = None
        self.s: A = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.y: E = None
        self.v: F = None
        self.r: C = None
        self.t: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: F = None
        self.q: F = None
        self.y: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.x: E = None
        self.p: J = None
        self.t: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: F = None
        self.o: H = None
        self.x: E = None
        self.u: F = None
        self.p: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: D = None
        self.r: E = None
        self.w: D = None
        self.y: E = None
        self.u: H = None
        self.t: C = None
        self.z: E = None
        self.v: A = None
        self.s: A = None
        self.txt = txt

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

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

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