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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: E = None
        self.u: F = None
        self.w: F = None
        self.o: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: E = None
        self.w: D = None
        self.r: A = None
        self.x: E = None
        self.v: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.r: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: E = None
        self.u: F = None
        self.w: F = None
        self.o: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: E = None
        self.w: D = None
        self.r: A = None
        self.x: E = None
        self.v: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.r: A = None
        self.txt = txt

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

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