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

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

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: A = None
        self.t: I = None
        self.u: J = None
        self.r: J = None
        self.w: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: J = None
        self.y: D = None
        self.z: B = None
        self.u: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.o: J = None
        self.r: H = None
        self.v: B = None
        self.s: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: C = None
        self.w: A = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.x: I = None
        self.q: F = None
        self.r: C = None
        self.o: B = None
        self.u: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: A = None
        self.t: I = None
        self.u: J = None
        self.r: J = None
        self.w: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: J = None
        self.y: D = None
        self.z: B = None
        self.u: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.o: J = None
        self.r: H = None
        self.v: B = None
        self.s: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: C = None
        self.w: A = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.x: I = None
        self.q: F = None
        self.r: C = None
        self.o: B = None
        self.u: G = None
        self.txt = txt

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

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