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

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

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

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

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

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

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

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

n.u = m
n.o = h
n.q = a
n.z = c
n.w = c
a.p = g
a.r = g
a.w = g
a.s = m
a.u = i
a.o = h
l.t = m
l.q = m
l.x = h
l.y = c
l.p = i
l.u = g
m.u = l
m.q = l
m.v = l
m.o = g
m.y = n
i.x = l
i.r = g
i.u = c
i.o = m
c.t = n
g.s = a
h.p = g
h.r = g
h.w = g
h.s = m
h.u = i
h.o = a
b.u = m
b.o = h
b.q = a
b.z = c
b.w = c
assert g.s.u.u.t.q.w.s.s.txt == "
class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: B = None
        self.q: B = None
        self.z: F = None
        self.w: F = None
        self.txt = txt

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

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

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

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

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

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

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

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