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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: I = None
        self.x: B = None
        self.y: E = None
        self.t: D = None
        self.z: B = None
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.o: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: A = None
        self.r: I = None
        self.w: B = None
        self.t: G = None
        self.z: B = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: I = None
        self.x: B = None
        self.y: E = None
        self.t: D = None
        self.z: B = None
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.o: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: A = None
        self.r: I = None
        self.w: B = None
        self.t: G = None
        self.z: B = None
        self.txt = txt

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

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

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