class A:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: G = None
        self.v: G = None
        self.o: E = None
        self.q: A = None
        self.w: D = None
        self.r: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.v: E = None
        self.t: G = None
        self.z: C = None
        self.txt = txt

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

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

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

n = A("n")
e = B("e")
f = C("f")
k = D("k")
b = E("b")
h = F("h")
i = G("i")
g = A("g")

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.v: E = None
        self.t: G = None
        self.z: C = None
        self.txt = txt

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

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

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

n = A("n")
e = B("e")
f = C("f")
k = D("k")
b = E("b")
h = F("h")
i = G("i")
g = A("g")

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