class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: G = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: I = None
        self.s: C = None
        self.r: C = None
        self.y: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: B = None
        self.q: B = None
        self.y: H = None
        self.s: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: C = None
        self.v: H = None
        self.s: C = None
        self.x: H = None
        self.w: F = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: I = None
        self.s: C = None
        self.r: C = None
        self.y: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: B = None
        self.q: B = None
        self.y: H = None
        self.s: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: C = None
        self.v: H = None
        self.s: C = None
        self.x: H = None
        self.w: F = None
        self.txt = txt

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

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