class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.s: H = None
        self.u: C = None
        self.q: C = None
        self.v: D = None
        self.r: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.p: E = None
        self.y: B = None
        self.t: I = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.p: E = None
        self.y: B = None
        self.t: I = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

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

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