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

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.y: D = None
        self.t: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.p: G = None
        self.q: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: A = None
        self.q: F = None
        self.y: F = None
        self.w: F = None
        self.x: C = None
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: D = None
        self.s: G = None
        self.u: A = None
        self.t: E = None
        self.txt = txt

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

j = A("j")
h = B("h")
e = C("e")
d = D("d")
n = E("n")
b = F("b")
m = G("m")
g = G("g")
k = C("k")
l = C("l")

j.q = b
j.w = n
j.p = h
j.u = g
j.x = g
h.s = e
h.v = m
h.w = n
e.u = b
e.y = d
e.t = h
d.v = b
d.p = m
d.q = m
n.t = d
n.p = d
n.o = j
n.q = b
n.y = b
n.w = b
n.x = e
b.o = e
b.z = d
b.s = m
b.u = j
b.t = n
m.u = b
m.v = b
m.w = j
m.s = j
m.t = g
m.q = h
m.x = d
g.u = b
g.v = b
g.w = j
g.s = j
g.t = m
g.q = h
g.x = d
k.u = b
k.y = d
k.t = h
l.u = b
l.y = d
l.t = h
assert g.t.s.p.w.p.v.t.o.q.t.txt == "
class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.w: E = None
        self.p: B = None
        self.u: G = None
        self.x: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.y: D = None
        self.t: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.p: G = None
        self.q: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: A = None
        self.q: F = None
        self.y: F = None
        self.w: F = None
        self.x: C = None
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: D = None
        self.s: G = None
        self.u: A = None
        self.t: E = None
        self.txt = txt

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

j = A("j")
h = B("h")
e = C("e")
d = D("d")
n = E("n")
b = F("b")
m = G("m")
g = G("g")
k = C("k")
l = C("l")

j.q = b
j.w = n
j.p = h
j.u = g
j.x = g
h.s = e
h.v = m
h.w = n
e.u = b
e.y = d
e.t = h
d.v = b
d.p = m
d.q = m
n.t = d
n.p = d
n.o = j
n.q = b
n.y = b
n.w = b
n.x = e
b.o = e
b.z = d
b.s = m
b.u = j
b.t = n
m.u = b
m.v = b
m.w = j
m.s = j
m.t = g
m.q = h
m.x = d
g.u = b
g.v = b
g.w = j
g.s = j
g.t = m
g.q = h
g.x = d
k.u = b
k.y = d
k.t = h
l.u = b
l.y = d
l.t = h
assert g.t.s.p.w.p.v.t.o.q.t.txt == "n"