class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.p: D = None
        self.z: H = None
        self.o: G = None
        self.x: C = None
        self.v: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: C = None
        self.s: C = None
        self.q: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: I = None
        self.s: D = None
        self.v: E = None
        self.w: I = None
        self.y: H = None
        self.p: I = None
        self.u: E = None
        self.q: D = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: C = None
        self.s: C = None
        self.q: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: I = None
        self.s: D = None
        self.v: E = None
        self.w: I = None
        self.y: H = None
        self.p: I = None
        self.u: E = None
        self.q: D = None
        self.txt = txt

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

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

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

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

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