class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: B = None
        self.r: D = None
        self.y: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: D = None
        self.z: B = None
        self.u: B = None
        self.txt = txt

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

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

n = A("n")
a = B("a")
k = C("k")
b = D("b")
g = E("g")
f = C("f")
h = A("h")
e = C("e")
m = D("m")
j = B("j")

n.q = g
n.x = j
n.r = m
n.y = m
a.w = j
a.v = b
k.r = a
k.z = a
k.x = b
k.u = j
b.y = e
b.w = a
b.z = a
b.q = n
g.r = a
g.x = j
g.p = j
f.r = j
f.z = j
f.x = b
f.u = a
h.q = g
h.x = a
h.r = m
h.y = b
e.r = j
e.u = j
e.x = m
e.z = a
m.y = f
m.w = a
m.z = a
m.q = h
j.w = a
j.v = m
assert n.x.w.v.y.r.txt == "
class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: B = None
        self.r: D = None
        self.y: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: D = None
        self.z: B = None
        self.u: B = None
        self.txt = txt

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

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

n = A("n")
a = B("a")
k = C("k")
b = D("b")
g = E("g")
f = C("f")
h = A("h")
e = C("e")
m = D("m")
j = B("j")

n.q = g
n.x = j
n.r = m
n.y = m
a.w = j
a.v = b
k.r = a
k.z = a
k.x = b
k.u = j
b.y = e
b.w = a
b.z = a
b.q = n
g.r = a
g.x = j
g.p = j
f.r = j
f.z = j
f.x = b
f.u = a
h.q = g
h.x = a
h.r = m
h.y = b
e.r = j
e.u = j
e.x = m
e.z = a
m.y = f
m.w = a
m.z = a
m.q = h
j.w = a
j.v = m
assert n.x.w.v.y.r.txt == "j"