class A:
    def __init__(self, txt: str):
        self.q: J = None
        self.t: D = None
        self.v: H = None
        self.s: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.p: J = None
        self.y: E = None
        self.x: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: J = None
        self.x: J = None
        self.u: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: C = None
        self.z: C = None
        self.u: F = None
        self.r: D = None
        self.v: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.p: J = None
        self.y: E = None
        self.x: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: J = None
        self.x: J = None
        self.u: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: C = None
        self.z: C = None
        self.u: F = None
        self.r: D = None
        self.v: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

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

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