class A:
    def __init__(self, txt: str):
        self.w: H = None
        self.v: D = None
        self.q: J = None
        self.x: E = None
        self.u: B = None
        self.y: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: E = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: D = None
        self.y: E = None
        self.x: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: E = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: D = None
        self.y: E = None
        self.x: E = None
        self.txt = txt

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

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