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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.u: E = None
        self.p: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: C = None
        self.x: E = None
        self.r: F = None
        self.o: E = None
        self.t: C = None
        self.z: G = None
        self.u: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: J = None
        self.w: J = None
        self.p: J = None
        self.o: A = None
        self.t: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.u: E = None
        self.p: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: C = None
        self.x: E = None
        self.r: F = None
        self.o: E = None
        self.t: C = None
        self.z: G = None
        self.u: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: J = None
        self.w: J = None
        self.p: J = None
        self.o: A = None
        self.t: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

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

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

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

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