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

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: A = None
        self.r: I = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: E = None
        self.z: I = None
        self.p: E = None
        self.s: A = None
        self.t: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: J = None
        self.q: B = None
        self.o: J = None
        self.v: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: I = None
        self.txt = txt

f = A("f")
k = B("k")
h = C("h")
i = D("i")
m = E("m")
g = F("g")
a = G("a")
d = H("d")
j = I("j")
e = J("e")

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

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: A = None
        self.r: I = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: E = None
        self.z: I = None
        self.p: E = None
        self.s: A = None
        self.t: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: J = None
        self.q: B = None
        self.o: J = None
        self.v: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: I = None
        self.txt = txt

f = A("f")
k = B("k")
h = C("h")
i = D("i")
m = E("m")
g = F("g")
a = G("a")
d = H("d")
j = I("j")
e = J("e")

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