class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: I = None
        self.y: F = None
        self.z: E = None
        self.u: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: J = None
        self.u: J = None
        self.y: D = None
        self.w: J = None
        self.z: J = None
        self.o: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: G = None
        self.z: C = None
        self.s: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.z: E = None
        self.o: E = None
        self.x: J = None
        self.r: J = None
        self.s: J = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: J = None
        self.u: J = None
        self.y: D = None
        self.w: J = None
        self.z: J = None
        self.o: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: G = None
        self.z: C = None
        self.s: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.z: E = None
        self.o: E = None
        self.x: J = None
        self.r: J = None
        self.s: J = None
        self.txt = txt

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

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

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