class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.z: F = None
        self.t: D = None
        self.y: C = None
        self.p: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: A = None
        self.v: C = None
        self.p: F = None
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: I = None
        self.o: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: F = None
        self.v: D = None
        self.y: G = None
        self.q: H = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: A = None
        self.v: C = None
        self.p: F = None
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: I = None
        self.o: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: F = None
        self.v: D = None
        self.y: G = None
        self.q: H = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

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

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