class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: G = None
        self.x: C = None
        self.t: G = None
        self.u: B = None
        self.s: C = None
        self.p: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.u: C = None
        self.q: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: A = None
        self.q: G = None
        self.w: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.u: D = None
        self.x: B = None
        self.s: A = None
        self.t: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.u: C = None
        self.q: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: A = None
        self.q: G = None
        self.w: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.u: D = None
        self.x: B = None
        self.s: A = None
        self.t: C = None
        self.txt = txt

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

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