class A:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: D = None
        self.u: G = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.v: H = None
        self.o: A = None
        self.s: I = None
        self.w: H = None
        self.x: C = None
        self.u: A = None
        self.q: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: E = None
        self.r: F = None
        self.t: G = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.v: H = None
        self.o: A = None
        self.s: I = None
        self.w: H = None
        self.x: C = None
        self.u: A = None
        self.q: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: E = None
        self.r: F = None
        self.t: G = None
        self.txt = txt

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

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