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

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

class C:
    def __init__(self, txt: str):
        self.y: H = None
        self.q: E = None
        self.w: E = None
        self.o: E = None
        self.u: A = None
        self.x: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.r: A = None
        self.p: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: A = None
        self.x: I = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: H = None
        self.q: E = None
        self.w: E = None
        self.o: E = None
        self.u: A = None
        self.x: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.r: A = None
        self.p: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: A = None
        self.x: I = None
        self.txt = txt

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

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

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

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