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

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

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.s: A = None
        self.z: E = None
        self.t: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.x: B = None
        self.z: I = None
        self.r: I = None
        self.t: D = None
        self.w: B = None
        self.v: A = None
        self.p: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.y: B = None
        self.x: C = None
        self.u: F = None
        self.r: G = None
        self.v: F = None
        self.s: G = None
        self.z: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: F = None
        self.o: E = None
        self.u: B = None
        self.s: G = None
        self.w: D = None
        self.p: C = None
        self.x: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.s: A = None
        self.z: E = None
        self.t: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.x: B = None
        self.z: I = None
        self.r: I = None
        self.t: D = None
        self.w: B = None
        self.v: A = None
        self.p: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.y: B = None
        self.x: C = None
        self.u: F = None
        self.r: G = None
        self.v: F = None
        self.s: G = None
        self.z: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: F = None
        self.o: E = None
        self.u: B = None
        self.s: G = None
        self.w: D = None
        self.p: C = None
        self.x: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

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

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