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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: I = None
        self.o: A = None
        self.s: D = None
        self.p: A = None
        self.y: C = None
        self.r: A = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: I = None
        self.o: A = None
        self.s: D = None
        self.p: A = None
        self.y: C = None
        self.r: A = None
        self.txt = txt

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

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

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