class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: I = None
        self.y: C = None
        self.s: B = None
        self.o: F = None
        self.u: D = None
        self.z: J = None
        self.v: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: I = None
        self.q: I = None
        self.t: A = None
        self.s: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.v: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: D = None
        self.w: D = None
        self.o: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: I = None
        self.q: I = None
        self.t: A = None
        self.s: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.v: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: D = None
        self.w: D = None
        self.o: A = None
        self.txt = txt

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

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

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