class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.q: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: A = None
        self.v: H = None
        self.p: F = None
        self.z: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.w: D = None
        self.y: C = None
        self.t: H = None
        self.r: G = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.w: I = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: A = None
        self.v: H = None
        self.p: F = None
        self.z: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.w: D = None
        self.y: C = None
        self.t: H = None
        self.r: G = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.w: I = None
        self.txt = txt

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

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