class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.q: F = None
        self.r: H = None
        self.s: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.v: F = None
        self.p: I = None
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: D = None
        self.r: E = None
        self.u: D = None
        self.x: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.x: A = None
        self.p: F = None
        self.t: F = None
        self.r: F = None
        self.z: E = None
        self.w: G = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: B = None
        self.o: G = None
        self.x: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.v: F = None
        self.p: I = None
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: D = None
        self.r: E = None
        self.u: D = None
        self.x: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.x: A = None
        self.p: F = None
        self.t: F = None
        self.r: F = None
        self.z: E = None
        self.w: G = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: B = None
        self.o: G = None
        self.x: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

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

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