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

class B:
    def __init__(self, txt: str):
        self.p: B = None
        self.s: I = None
        self.t: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: I = None
        self.y: E = None
        self.z: H = None
        self.p: B = None
        self.t: F = None
        self.o: E = None
        self.s: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.z: D = None
        self.u: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: B = None
        self.o: D = None
        self.y: C = None
        self.z: D = None
        self.x: B = None
        self.w: F = None
        self.v: A = None
        self.txt = txt

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

j.q = l
j.p = b
k.p = f
k.s = d
k.t = l
m.q = j
m.w = d
m.y = e
m.o = e
m.z = n
m.p = f
m.s = f
m.t = b
a.o = j
a.s = n
a.u = n
a.x = d
e.t = n
b.t = a
b.q = m
b.y = m
l.y = f
l.z = a
l.u = m
n.y = a
n.q = d
d.t = j
d.v = j
d.q = f
d.o = a
d.z = a
d.y = m
d.x = k
d.w = b
f.p = k
f.s = d
f.t = l
assert d.o.o.p.t.o.q.y.s.txt == "
class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: B = None
        self.s: I = None
        self.t: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: I = None
        self.y: E = None
        self.z: H = None
        self.p: B = None
        self.t: F = None
        self.o: E = None
        self.s: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.z: D = None
        self.u: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: B = None
        self.o: D = None
        self.y: C = None
        self.z: D = None
        self.x: B = None
        self.w: F = None
        self.v: A = None
        self.txt = txt

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

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