class A:
    def __init__(self, txt: str):
        self.p: H = None
        self.y: E = None
        self.u: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: J = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: D = None
        self.z: J = None
        self.w: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: C = None
        self.p: J = None
        self.w: I = None
        self.r: C = None
        self.v: C = None
        self.o: H = None
        self.z: I = None
        self.s: G = None
        self.t: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: J = None
        self.u: D = None
        self.q: B = None
        self.z: D = None
        self.w: E = None
        self.t: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.z: J = None
        self.q: E = None
        self.x: C = None
        self.u: E = None
        self.w: D = None
        self.p: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: E = None
        self.p: D = None
        self.s: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: G = None
        self.v: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: J = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: D = None
        self.z: J = None
        self.w: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: C = None
        self.p: J = None
        self.w: I = None
        self.r: C = None
        self.v: C = None
        self.o: H = None
        self.z: I = None
        self.s: G = None
        self.t: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: J = None
        self.u: D = None
        self.q: B = None
        self.z: D = None
        self.w: E = None
        self.t: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.z: J = None
        self.q: E = None
        self.x: C = None
        self.u: E = None
        self.w: D = None
        self.p: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: E = None
        self.p: D = None
        self.s: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: G = None
        self.v: H = None
        self.txt = txt

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

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