class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: F = None
        self.y: A = None
        self.z: B = None
        self.s: D = None
        self.t: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.r: G = None
        self.s: E = None
        self.v: C = None
        self.u: D = None
        self.y: B = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: F = None
        self.y: A = None
        self.z: B = None
        self.s: D = None
        self.t: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.r: G = None
        self.s: E = None
        self.v: C = None
        self.u: D = None
        self.y: B = None
        self.txt = txt

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

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

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