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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: G = None
        self.y: A = None
        self.p: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: C = None
        self.x: G = None
        self.w: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: B = None
        self.r: G = None
        self.w: D = None
        self.z: B = None
        self.x: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: A = None
        self.p: A = None
        self.u: A = None
        self.txt = txt

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

n = A("n")
i = B("i")
e = C("e")
k = D("k")
h = E("h")
c = F("c")
a = G("a")
j = A("j")

n.q = h
n.w = e
n.s = i
i.o = e
e.u = a
e.v = a
e.y = j
e.p = c
k.s = a
k.x = a
k.w = a
k.v = e
h.o = c
h.x = c
h.y = i
h.z = i
h.r = a
h.w = k
c.t = h
c.r = j
c.p = n
c.u = n
a.p = h
a.z = h
j.q = h
j.w = e
j.s = i
assert c.t.w.x.p.x.p.txt == "
class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: C = None
        self.s: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: G = None
        self.y: A = None
        self.p: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: C = None
        self.x: G = None
        self.w: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: B = None
        self.r: G = None
        self.w: D = None
        self.z: B = None
        self.x: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: A = None
        self.p: A = None
        self.u: A = None
        self.txt = txt

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

n = A("n")
i = B("i")
e = C("e")
k = D("k")
h = E("h")
c = F("c")
a = G("a")
j = A("j")

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