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

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

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

class D:
    def __init__(self, txt: str):
        self.t: I = None
        self.x: E = None
        self.z: J = None
        self.r: H = None
        self.s: C = None
        self.p: B = None
        self.y: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: F = None
        self.y: F = None
        self.u: B = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: D = None
        self.y: B = None
        self.p: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: D = None
        self.x: I = None
        self.y: H = None
        self.o: H = None
        self.z: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.x: G = None
        self.w: B = None
        self.t: J = None
        self.z: G = None
        self.p: D = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: I = None
        self.x: E = None
        self.z: J = None
        self.r: H = None
        self.s: C = None
        self.p: B = None
        self.y: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: F = None
        self.y: F = None
        self.u: B = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: D = None
        self.y: B = None
        self.p: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: D = None
        self.x: I = None
        self.y: H = None
        self.o: H = None
        self.z: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.x: G = None
        self.w: B = None
        self.t: J = None
        self.z: G = None
        self.p: D = None
        self.txt = txt

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

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

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