class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: F = None
        self.v: F = None
        self.y: H = None
        self.z: B = None
        self.q: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: H = None
        self.v: I = None
        self.r: A = None
        self.o: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.o: H = None
        self.w: G = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: H = None
        self.v: I = None
        self.r: A = None
        self.o: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.o: H = None
        self.w: G = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

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

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